Commit 64aab93c authored by David Ahern's avatar David Ahern Committed by Arnaldo Carvalho de Melo

perf script: look up thread using tid instead of pid

This allows the thread name to be dispalyed when dumping
events:
           myapp 25118 [000] 450385.538815: context-switches ...
    myapp:worker 25119 [000] 450385.538894: context-switches ...

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1324578603-12762-4-git-send-email-dsahern@gmail.comSigned-off-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent f5faf726
...@@ -443,7 +443,7 @@ static int process_sample_event(struct perf_tool *tool __used, ...@@ -443,7 +443,7 @@ static int process_sample_event(struct perf_tool *tool __used,
struct machine *machine) struct machine *machine)
{ {
struct addr_location al; struct addr_location al;
struct thread *thread = machine__findnew_thread(machine, event->ip.pid); struct thread *thread = machine__findnew_thread(machine, event->ip.tid);
if (thread == NULL) { if (thread == NULL) {
pr_debug("problem processing %d event, skipping it.\n", pr_debug("problem processing %d event, skipping it.\n",
......
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