diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2010-05-31 18:03:40 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-05-31 18:10:32 -0400 |
commit | af64865ba6825e10fe62a3105fea5cadffeb52c6 (patch) | |
tree | ab3f0248fdf2d2b14794ddb19bb5202073e21861 /tools | |
parent | 13eb04fdbeb9d21dfe4696630daefe18ef6a1a84 (diff) |
perf: Use event__process_task from perf sched
perf sched uses event__process_comm(), which means it can resolve
comms from:
- tasks that have exec'ed (kernel comm events)
- tasks that were running when perf record started the actual
recording (synthetized comm events)
But perf sched can't resolve the pids of tasks that were created
after the recording started.
To solve this, we need to inherit the comms on fork events using
event__process_task().
This fixes various unresolved pids in perf sched, easily visible
with:
perf sched record perf bench sched messaging
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Stephane Eranian <eranian@google.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-sched.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index f67bce2a83b4..55f3b5dcc731 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c | |||
@@ -1645,6 +1645,7 @@ static struct perf_event_ops event_ops = { | |||
1645 | .sample = process_sample_event, | 1645 | .sample = process_sample_event, |
1646 | .comm = event__process_comm, | 1646 | .comm = event__process_comm, |
1647 | .lost = event__process_lost, | 1647 | .lost = event__process_lost, |
1648 | .fork = event__process_task, | ||
1648 | .ordered_samples = true, | 1649 | .ordered_samples = true, |
1649 | }; | 1650 | }; |
1650 | 1651 | ||