diff options
author | David Ahern <dsahern@gmail.com> | 2011-12-22 13:30:03 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-12-23 13:35:00 -0500 |
commit | 64aab93cdffb3967642ffab954395ae2400c0b06 (patch) | |
tree | 9f5313f3d19c8619f6d7f6b0e35cc2764d7ba1f1 /tools/perf/builtin-script.c | |
parent | f5faf726184a6a5ca1735f610cb97e509fce33e2 (diff) |
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.com
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-script.c')
-rw-r--r-- | tools/perf/builtin-script.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index ea71c5e1a94f..d71b745da06e 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c | |||
@@ -443,7 +443,7 @@ static int process_sample_event(struct perf_tool *tool __used, | |||
443 | struct machine *machine) | 443 | struct machine *machine) |
444 | { | 444 | { |
445 | struct addr_location al; | 445 | struct addr_location al; |
446 | struct thread *thread = machine__findnew_thread(machine, event->ip.pid); | 446 | struct thread *thread = machine__findnew_thread(machine, event->ip.tid); |
447 | 447 | ||
448 | if (thread == NULL) { | 448 | if (thread == NULL) { |
449 | pr_debug("problem processing %d event, skipping it.\n", | 449 | pr_debug("problem processing %d event, skipping it.\n", |