Commit 11c9abf2 authored by Don Zickus's avatar Don Zickus Committed by Arnaldo Carvalho de Melo

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: default avatarDon 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.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 2c86c7ca
...@@ -101,6 +101,7 @@ static struct machine *setup_fake_machine(struct machines *machines) ...@@ -101,6 +101,7 @@ static struct machine *setup_fake_machine(struct machines *machines)
.mmap = { .mmap = {
.header = { .misc = PERF_RECORD_MISC_USER, }, .header = { .misc = PERF_RECORD_MISC_USER, },
.pid = fake_mmap_info[i].pid, .pid = fake_mmap_info[i].pid,
.tid = fake_mmap_info[i].pid,
.start = fake_mmap_info[i].start, .start = fake_mmap_info[i].start,
.len = 0x1000ULL, .len = 0x1000ULL,
.pgoff = 0ULL, .pgoff = 0ULL,
......
...@@ -1027,7 +1027,7 @@ int machine__process_mmap2_event(struct machine *machine, ...@@ -1027,7 +1027,7 @@ int machine__process_mmap2_event(struct machine *machine,
} }
thread = machine__findnew_thread(machine, event->mmap2.pid, thread = machine__findnew_thread(machine, event->mmap2.pid,
event->mmap2.pid); event->mmap2.tid);
if (thread == NULL) if (thread == NULL)
goto out_problem; goto out_problem;
...@@ -1075,7 +1075,7 @@ int machine__process_mmap_event(struct machine *machine, union perf_event *event ...@@ -1075,7 +1075,7 @@ int machine__process_mmap_event(struct machine *machine, union perf_event *event
} }
thread = machine__findnew_thread(machine, event->mmap.pid, thread = machine__findnew_thread(machine, event->mmap.pid,
event->mmap.pid); event->mmap.tid);
if (thread == NULL) if (thread == NULL)
goto out_problem; goto out_problem;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment