perf addr_location: Rename al->mg to al->maps
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 26 Nov 2019 01:11:20 +0000 (22:11 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 26 Nov 2019 14:07:46 +0000 (11:07 -0300)
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>
tools/perf/util/callchain.c
tools/perf/util/db-export.c
tools/perf/util/event.c
tools/perf/util/hist.c
tools/perf/util/machine.c
tools/perf/util/scripting-engines/trace-event-python.c
tools/perf/util/symbol.h
tools/perf/util/unwind-libdw.c
tools/perf/util/unwind-libunwind-local.c

index 5cefce33b66bb9b09c477bce508cec7081bdc865..c7270c057b6bbcd86c8349200f5daa99271cb896 100644 (file)
@@ -1106,7 +1106,7 @@ int hist_entry__append_callchain(struct hist_entry *he, struct perf_sample *samp
 int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *node,
                        bool hide_unresolved)
 {
-       al->m = node->ms.mg;
+       al->maps = node->ms.mg;
        al->map = node->ms.map;
        al->sym = node->ms.sym;
        al->srcline = node->srcline;
@@ -1119,8 +1119,8 @@ int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *
                        goto out;
        }
 
-       if (al->mg == &al->mg->machine->kmaps) {
-               if (machine__is_host(al->mg->machine)) {
+       if (al->maps == &al->maps->machine->kmaps) {
+               if (machine__is_host(al->maps->machine)) {
                        al->cpumode = PERF_RECORD_MISC_KERNEL;
                        al->level = 'k';
                } else {
@@ -1128,7 +1128,7 @@ int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *
                        al->level = 'g';
                }
        } else {
-               if (machine__is_host(al->mg->machine)) {
+               if (machine__is_host(al->maps->machine)) {
                        al->cpumode = PERF_RECORD_MISC_USER;
                        al->level = '.';
                } else if (perf_guest) {
index e726922eb663ef57101e288af7905c3132eac31e..db7447154622820eee0dbfd6accb84d2592f0659 100644 (file)
@@ -181,7 +181,7 @@ static int db_ids_from_al(struct db_export *dbe, struct addr_location *al,
        if (al->map) {
                struct dso *dso = al->map->dso;
 
-               err = db_export__dso(dbe, dso, al->mg->machine);
+               err = db_export__dso(dbe, dso, al->maps->machine);
                if (err)
                        return err;
                *dso_db_id = dso->db_id;
@@ -251,7 +251,7 @@ static struct call_path *call_path_from_sample(struct db_export *dbe,
                 */
                al.sym = node->ms.sym;
                al.map = node->ms.map;
-               al.m = thread->maps;
+               al.maps = thread->maps;
                al.addr = node->ip;
 
                if (al.map && !al.sym)
@@ -360,13 +360,13 @@ int db_export__sample(struct db_export *dbe, union perf_event *event,
        if (err)
                return err;
 
-       err = db_export__machine(dbe, al->mg->machine);
+       err = db_export__machine(dbe, al->maps->machine);
        if (err)
                return err;
 
-       main_thread = thread__main_thread(al->mg->machine, thread);
+       main_thread = thread__main_thread(al->maps->machine, thread);
 
-       err = db_export__threads(dbe, thread, main_thread, al->mg->machine, &comm);
+       err = db_export__threads(dbe, thread, main_thread, al->maps->machine, &comm);
        if (err)
                goto out_put;
 
@@ -380,7 +380,7 @@ int db_export__sample(struct db_export *dbe, union perf_event *event,
                goto out_put;
 
        if (dbe->cpr) {
-               struct call_path *cp = call_path_from_sample(dbe, al->mg->machine,
+               struct call_path *cp = call_path_from_sample(dbe, al->maps->machine,
                                                             thread, sample,
                                                             evsel);
                if (cp) {
index 2f0b77366cc0f6ce7177bdff91aa3b19a6a16409..fc3da38beef05e9fb6fa3ddef101aa0f78d1cebf 100644 (file)
@@ -461,7 +461,7 @@ struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr,
        struct machine *machine = mg->machine;
        bool load_map = false;
 
-       al->mg = mg;
+       al->maps = mg;
        al->thread = thread;
        al->addr = addr;
        al->cpumode = cpumode;
@@ -474,13 +474,13 @@ struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr,
 
        if (cpumode == PERF_RECORD_MISC_KERNEL && perf_host) {
                al->level = 'k';
-               al->mg = mg = &machine->kmaps;
+               al->maps = mg = &machine->kmaps;
                load_map = true;
        } else if (cpumode == PERF_RECORD_MISC_USER && perf_host) {
                al->level = '.';
        } else if (cpumode == PERF_RECORD_MISC_GUEST_KERNEL && perf_guest) {
                al->level = 'g';
-               al->mg = mg = &machine->kmaps;
+               al->maps = mg = &machine->kmaps;
                load_map = true;
        } else if (cpumode == PERF_RECORD_MISC_GUEST_USER && perf_guest) {
                al->level = 'u';
index 0a8d72ae93cac4260fe31d5fbf01dfb453f5a4b9..5ebfbe37344235a687e0e8e6e5363affdd389ac3 100644 (file)
@@ -692,7 +692,7 @@ __hists__add_entry(struct hists *hists,
                        .ino = ns ? ns->link_info[CGROUP_NS_INDEX].ino : 0,
                },
                .ms = {
-                       .mg     = al->mg,
+                       .mg     = al->maps,
                        .map    = al->map,
                        .sym    = al->sym,
                },
@@ -760,7 +760,7 @@ struct hist_entry *hists__add_entry_block(struct hists *hists,
                .block_info = block_info,
                .hists = hists,
                .ms = {
-                       .mg  = al->mg,
+                       .mg  = al->maps,
                        .map = al->map,
                        .sym = al->sym,
                },
@@ -895,7 +895,7 @@ iter_next_branch_entry(struct hist_entry_iter *iter, struct addr_location *al)
        if (iter->curr >= iter->total)
                return 0;
 
-       al->m = bi[i].to.ms.mg;
+       al->maps = bi[i].to.ms.mg;
        al->map = bi[i].to.ms.map;
        al->sym = bi[i].to.ms.sym;
        al->addr = bi[i].to.addr;
@@ -1072,7 +1072,7 @@ iter_add_next_cumulative_entry(struct hist_entry_iter *iter,
                .comm = thread__comm(al->thread),
                .ip = al->addr,
                .ms = {
-                       .mg  = al->mg,
+                       .mg  = al->maps,
                        .map = al->map,
                        .sym = al->sym,
                },
index b351476407e63906517b44c8691d5049ccfe7009..de5d6b4727e30aca98445731995d6d13068da9df 100644 (file)
@@ -1934,7 +1934,7 @@ static void ip__resolve_ams(struct thread *thread,
 
        ams->addr = ip;
        ams->al_addr = al.addr;
-       ams->ms.mg  = al.mg;
+       ams->ms.mg  = al.maps;
        ams->ms.sym = al.sym;
        ams->ms.map = al.map;
        ams->phys_addr = 0;
@@ -1952,7 +1952,7 @@ static void ip__resolve_data(struct thread *thread,
 
        ams->addr = addr;
        ams->al_addr = al.addr;
-       ams->ms.mg  = al.mg;
+       ams->ms.mg  = al.maps;
        ams->ms.sym = al.sym;
        ams->ms.map = al.map;
        ams->phys_addr = phys_addr;
@@ -2069,7 +2069,7 @@ static int add_callchain_ip(struct thread *thread,
                iter_cycles = iter->cycles;
        }
 
-       ms.mg  = al.mg;
+       ms.mg  = al.maps;
        ms.map = al.map;
        ms.sym = al.sym;
        srcline = callchain_srcline(&ms, al.addr);
index 9581a904af29a822f5155cfa97a6587bd5f14b34..80ca5d0ab7fe21c9d509e66a5f0a33299aa6cfd6 100644 (file)
@@ -1127,7 +1127,7 @@ static void python_export_sample_table(struct db_export *dbe,
 
        tuple_set_u64(t, 0, es->db_id);
        tuple_set_u64(t, 1, es->evsel->db_id);
-       tuple_set_u64(t, 2, es->al->mg->machine->db_id);
+       tuple_set_u64(t, 2, es->al->maps->machine->db_id);
        tuple_set_u64(t, 3, es->al->thread->db_id);
        tuple_set_u64(t, 4, es->comm_db_id);
        tuple_set_u64(t, 5, es->dso_db_id);
index d3e8faeab3f2d00fdc8b4455f8cde24eb9c96033..29c4ea4c354fd10644cb26cf4b2a3dd753e5cc6d 100644 (file)
@@ -108,7 +108,7 @@ struct ref_reloc_sym {
 
 struct addr_location {
        struct thread *thread;
-       struct maps   *mg;
+       struct maps   *maps;
        struct map    *map;
        struct symbol *sym;
        const char    *srcline;
index 33f655207c6236322004e60bba3d0e7d4f045a6f..bb4f515bdff9a17ab060a1bfb8a922adc8eb0cd7 100644 (file)
@@ -81,7 +81,7 @@ static int entry(u64 ip, struct unwind_info *ui)
                return -1;
 
        e->ip     = ip;
-       e->ms.mg  = al.mg;
+       e->ms.mg  = al.maps;
        e->ms.map = al.map;
        e->ms.sym = al.sym;
 
index 30f921f634876e4859b0c14df6f1fd6cfd4e5a1c..a744dfaefef5dae9398789c46063b880f95796ec 100644 (file)
@@ -578,7 +578,7 @@ static int entry(u64 ip, struct thread *thread,
        e.ms.sym = thread__find_symbol(thread, PERF_RECORD_MISC_USER, ip, &al);
        e.ip     = ip;
        e.ms.map = al.map;
-       e.ms.mg  = al.mg;
+       e.ms.mg  = al.maps;
 
        pr_debug("unwind: %s:ip = 0x%" PRIx64 " (0x%" PRIx64 ")\n",
                 al.sym ? al.sym->name : "''",