aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDon Zickus <dzickus@redhat.com>2014-02-26 10:45:27 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-03-18 17:17:00 -0400
commit11c9abf2270793bd1c1b8828edb4223f8010e56c (patch)
tree119d802e4d8b5d6e7bbf9be0feecda284c0590ac /tools
parent2c86c7ca760634f09dcbd76069e5102b4de6f8f1 (diff)
perf tools: Use tid in mmap/mmap2 events to find maps
Now that we can properly synthesize threads system-wide, make sure the mmap and mmap2 events use tids instead of pids to locate their maps. Signed-off-by: Don Zickus <dzickus@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1393429527-167840-3-git-send-email-dzickus@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/tests/hists_link.c1
-rw-r--r--tools/perf/util/machine.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/tests/hists_link.c b/tools/perf/tests/hists_link.c
index 2b6519e0e36f..7ccbc7b6ae77 100644
--- a/tools/perf/tests/hists_link.c
+++ b/tools/perf/tests/hists_link.c
@@ -101,6 +101,7 @@ static struct machine *setup_fake_machine(struct machines *machines)
101 .mmap = { 101 .mmap = {
102 .header = { .misc = PERF_RECORD_MISC_USER, }, 102 .header = { .misc = PERF_RECORD_MISC_USER, },
103 .pid = fake_mmap_info[i].pid, 103 .pid = fake_mmap_info[i].pid,
104 .tid = fake_mmap_info[i].pid,
104 .start = fake_mmap_info[i].start, 105 .start = fake_mmap_info[i].start,
105 .len = 0x1000ULL, 106 .len = 0x1000ULL,
106 .pgoff = 0ULL, 107 .pgoff = 0ULL,
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index d280bf210183..a53cd0b8c151 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1027,7 +1027,7 @@ int machine__process_mmap2_event(struct machine *machine,
1027 } 1027 }
1028 1028
1029 thread = machine__findnew_thread(machine, event->mmap2.pid, 1029 thread = machine__findnew_thread(machine, event->mmap2.pid,
1030 event->mmap2.pid); 1030 event->mmap2.tid);
1031 if (thread == NULL) 1031 if (thread == NULL)
1032 goto out_problem; 1032 goto out_problem;
1033 1033
@@ -1075,7 +1075,7 @@ int machine__process_mmap_event(struct machine *machine, union perf_event *event
1075 } 1075 }
1076 1076
1077 thread = machine__findnew_thread(machine, event->mmap.pid, 1077 thread = machine__findnew_thread(machine, event->mmap.pid,
1078 event->mmap.pid); 1078 event->mmap.tid);
1079 if (thread == NULL) 1079 if (thread == NULL)
1080 goto out_problem; 1080 goto out_problem;
1081 1081