Skip to content

Commit 694520d

Browse files
committed
perf addr_location: Rename al->mg to al->maps
One more step on the merge of 'struct maps' with 'struct map_groups'. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-foo95pyyp3bhocbt7yd8qrvq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent fe87797 commit 694520d

9 files changed

Lines changed: 24 additions & 24 deletions

File tree

‎tools/perf/util/callchain.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ int hist_entry__append_callchain(struct hist_entry *he, struct perf_sample *samp
11061106
int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *node,
11071107
bool hide_unresolved)
11081108
{
1109-
al->mg = node->ms.mg;
1109+
al->maps = node->ms.mg;
11101110
al->map = node->ms.map;
11111111
al->sym = node->ms.sym;
11121112
al->srcline = node->srcline;
@@ -1119,16 +1119,16 @@ int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *
11191119
goto out;
11201120
}
11211121

1122-
if (al->mg == &al->mg->machine->kmaps) {
1123-
if (machine__is_host(al->mg->machine)) {
1122+
if (al->maps == &al->maps->machine->kmaps) {
1123+
if (machine__is_host(al->maps->machine)) {
11241124
al->cpumode = PERF_RECORD_MISC_KERNEL;
11251125
al->level = 'k';
11261126
} else {
11271127
al->cpumode = PERF_RECORD_MISC_GUEST_KERNEL;
11281128
al->level = 'g';
11291129
}
11301130
} else {
1131-
if (machine__is_host(al->mg->machine)) {
1131+
if (machine__is_host(al->maps->machine)) {
11321132
al->cpumode = PERF_RECORD_MISC_USER;
11331133
al->level = '.';
11341134
} else if (perf_guest) {

‎tools/perf/util/db-export.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ static int db_ids_from_al(struct db_export *dbe, struct addr_location *al,
181181
if (al->map) {
182182
struct dso *dso = al->map->dso;
183183

184-
err = db_export__dso(dbe, dso, al->mg->machine);
184+
err = db_export__dso(dbe, dso, al->maps->machine);
185185
if (err)
186186
return err;
187187
*dso_db_id = dso->db_id;
@@ -251,7 +251,7 @@ static struct call_path *call_path_from_sample(struct db_export *dbe,
251251
*/
252252
al.sym = node->ms.sym;
253253
al.map = node->ms.map;
254-
al.mg = thread->maps;
254+
al.maps = thread->maps;
255255
al.addr = node->ip;
256256

257257
if (al.map && !al.sym)
@@ -360,13 +360,13 @@ int db_export__sample(struct db_export *dbe, union perf_event *event,
360360
if (err)
361361
return err;
362362

363-
err = db_export__machine(dbe, al->mg->machine);
363+
err = db_export__machine(dbe, al->maps->machine);
364364
if (err)
365365
return err;
366366

367-
main_thread = thread__main_thread(al->mg->machine, thread);
367+
main_thread = thread__main_thread(al->maps->machine, thread);
368368

369-
err = db_export__threads(dbe, thread, main_thread, al->mg->machine, &comm);
369+
err = db_export__threads(dbe, thread, main_thread, al->maps->machine, &comm);
370370
if (err)
371371
goto out_put;
372372

@@ -380,7 +380,7 @@ int db_export__sample(struct db_export *dbe, union perf_event *event,
380380
goto out_put;
381381

382382
if (dbe->cpr) {
383-
struct call_path *cp = call_path_from_sample(dbe, al->mg->machine,
383+
struct call_path *cp = call_path_from_sample(dbe, al->maps->machine,
384384
thread, sample,
385385
evsel);
386386
if (cp) {

‎tools/perf/util/event.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr,
461461
struct machine *machine = mg->machine;
462462
bool load_map = false;
463463

464-
al->mg = mg;
464+
al->maps = mg;
465465
al->thread = thread;
466466
al->addr = addr;
467467
al->cpumode = cpumode;
@@ -474,13 +474,13 @@ struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr,
474474

475475
if (cpumode == PERF_RECORD_MISC_KERNEL && perf_host) {
476476
al->level = 'k';
477-
al->mg = mg = &machine->kmaps;
477+
al->maps = mg = &machine->kmaps;
478478
load_map = true;
479479
} else if (cpumode == PERF_RECORD_MISC_USER && perf_host) {
480480
al->level = '.';
481481
} else if (cpumode == PERF_RECORD_MISC_GUEST_KERNEL && perf_guest) {
482482
al->level = 'g';
483-
al->mg = mg = &machine->kmaps;
483+
al->maps = mg = &machine->kmaps;
484484
load_map = true;
485485
} else if (cpumode == PERF_RECORD_MISC_GUEST_USER && perf_guest) {
486486
al->level = 'u';

‎tools/perf/util/hist.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ __hists__add_entry(struct hists *hists,
692692
.ino = ns ? ns->link_info[CGROUP_NS_INDEX].ino : 0,
693693
},
694694
.ms = {
695-
.mg = al->mg,
695+
.mg = al->maps,
696696
.map = al->map,
697697
.sym = al->sym,
698698
},
@@ -760,7 +760,7 @@ struct hist_entry *hists__add_entry_block(struct hists *hists,
760760
.block_info = block_info,
761761
.hists = hists,
762762
.ms = {
763-
.mg = al->mg,
763+
.mg = al->maps,
764764
.map = al->map,
765765
.sym = al->sym,
766766
},
@@ -895,7 +895,7 @@ iter_next_branch_entry(struct hist_entry_iter *iter, struct addr_location *al)
895895
if (iter->curr >= iter->total)
896896
return 0;
897897

898-
al->mg = bi[i].to.ms.mg;
898+
al->maps = bi[i].to.ms.mg;
899899
al->map = bi[i].to.ms.map;
900900
al->sym = bi[i].to.ms.sym;
901901
al->addr = bi[i].to.addr;
@@ -1072,7 +1072,7 @@ iter_add_next_cumulative_entry(struct hist_entry_iter *iter,
10721072
.comm = thread__comm(al->thread),
10731073
.ip = al->addr,
10741074
.ms = {
1075-
.mg = al->mg,
1075+
.mg = al->maps,
10761076
.map = al->map,
10771077
.sym = al->sym,
10781078
},

‎tools/perf/util/machine.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,7 +1934,7 @@ static void ip__resolve_ams(struct thread *thread,
19341934

19351935
ams->addr = ip;
19361936
ams->al_addr = al.addr;
1937-
ams->ms.mg = al.mg;
1937+
ams->ms.mg = al.maps;
19381938
ams->ms.sym = al.sym;
19391939
ams->ms.map = al.map;
19401940
ams->phys_addr = 0;
@@ -1952,7 +1952,7 @@ static void ip__resolve_data(struct thread *thread,
19521952

19531953
ams->addr = addr;
19541954
ams->al_addr = al.addr;
1955-
ams->ms.mg = al.mg;
1955+
ams->ms.mg = al.maps;
19561956
ams->ms.sym = al.sym;
19571957
ams->ms.map = al.map;
19581958
ams->phys_addr = phys_addr;
@@ -2069,7 +2069,7 @@ static int add_callchain_ip(struct thread *thread,
20692069
iter_cycles = iter->cycles;
20702070
}
20712071

2072-
ms.mg = al.mg;
2072+
ms.mg = al.maps;
20732073
ms.map = al.map;
20742074
ms.sym = al.sym;
20752075
srcline = callchain_srcline(&ms, al.addr);

‎tools/perf/util/scripting-engines/trace-event-python.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ static void python_export_sample_table(struct db_export *dbe,
11271127

11281128
tuple_set_u64(t, 0, es->db_id);
11291129
tuple_set_u64(t, 1, es->evsel->db_id);
1130-
tuple_set_u64(t, 2, es->al->mg->machine->db_id);
1130+
tuple_set_u64(t, 2, es->al->maps->machine->db_id);
11311131
tuple_set_u64(t, 3, es->al->thread->db_id);
11321132
tuple_set_u64(t, 4, es->comm_db_id);
11331133
tuple_set_u64(t, 5, es->dso_db_id);

‎tools/perf/util/symbol.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ struct ref_reloc_sym {
108108

109109
struct addr_location {
110110
struct thread *thread;
111-
struct maps *mg;
111+
struct maps *maps;
112112
struct map *map;
113113
struct symbol *sym;
114114
const char *srcline;

‎tools/perf/util/unwind-libdw.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static int entry(u64 ip, struct unwind_info *ui)
8181
return -1;
8282

8383
e->ip = ip;
84-
e->ms.mg = al.mg;
84+
e->ms.mg = al.maps;
8585
e->ms.map = al.map;
8686
e->ms.sym = al.sym;
8787

‎tools/perf/util/unwind-libunwind-local.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ static int entry(u64 ip, struct thread *thread,
578578
e.ms.sym = thread__find_symbol(thread, PERF_RECORD_MISC_USER, ip, &al);
579579
e.ip = ip;
580580
e.ms.map = al.map;
581-
e.ms.mg = al.mg;
581+
e.ms.mg = al.maps;
582582

583583
pr_debug("unwind: %s:ip = 0x%" PRIx64 " (0x%" PRIx64 ")\n",
584584
al.sym ? al.sym->name : "''",

0 commit comments

Comments
 (0)