Skip to content

Commit

Permalink
perf script: look up thread using tid instead of pid
Browse files Browse the repository at this point in the history
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.com
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
David Ahern authored and Arnaldo Carvalho de Melo committed Dec 23, 2011
1 parent f5faf72 commit 64aab93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/builtin-script.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ static int process_sample_event(struct perf_tool *tool __used,
struct machine *machine)
{
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) {
pr_debug("problem processing %d event, skipping it.\n",
Expand Down

0 comments on commit 64aab93

Please sign in to comment.