summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/db-export.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-11-04 09:59:48 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-11-12 08:20:53 -0300
commitd3a022cbdce6f361b1effbff1eb18546690592c8 (patch)
tree3c341a6da5df42215d8033445746b7b5d91a0bc6 /tools/perf/util/db-export.c
parent9d355b381b35be1ac4e77600d6b9b27c674c5d5f (diff)
downloadlinux-d3a022cbdce6f361b1effbff1eb18546690592c8.tar.bz2
perf tools: Add map_groups to 'struct addr_location'
From there we can get al->mg->machine, so replace that field with the more useful 'struct map_groups' that for now we're obtaining from al->map->groups, and that is one thing getting into the way of maps being fully shareable. 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-4qdducrm32tgrjupcp0kjh1e@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/db-export.c')
-rw-r--r--tools/perf/util/db-export.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/util/db-export.c b/tools/perf/util/db-export.c
index 752227b265e7..44b465c0a343 100644
--- a/tools/perf/util/db-export.c
+++ b/tools/perf/util/db-export.c
@@ -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->machine);
+ err = db_export__dso(dbe, dso, al->mg->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->sym;
al.map = node->map;
- al.machine = machine;
+ al.mg = thread->mg;
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->machine);
+ err = db_export__machine(dbe, al->mg->machine);
if (err)
return err;
- main_thread = thread__main_thread(al->machine, thread);
+ main_thread = thread__main_thread(al->mg->machine, thread);
- err = db_export__threads(dbe, thread, main_thread, al->machine, &comm);
+ err = db_export__threads(dbe, thread, main_thread, al->mg->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->machine,
+ struct call_path *cp = call_path_from_sample(dbe, al->mg->machine,
thread, sample,
evsel);
if (cp) {