Prev: [PATCH 3/4] perf: Do the comm inheritance per thread in event__process_task
Next: BSE nanoengine git tree
From: Frederic Weisbecker on 31 May 2010 19:10 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(a)gmail.com> Cc: Ingo Molnar <mingo(a)elte.hu> Cc: Peter Zijlstra <a.p.zijlstra(a)chello.nl> Cc: Arnaldo Carvalho de Melo <acme(a)redhat.com> Cc: Paul Mackerras <paulus(a)samba.org> Cc: Tom Zanussi <tzanussi(a)gmail.com> Cc: Stephane Eranian <eranian(a)google.com> --- 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 f67bce2..55f3b5d 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -1645,6 +1645,7 @@ static struct perf_event_ops event_ops = { .sample = process_sample_event, .comm = event__process_comm, .lost = event__process_lost, + .fork = event__process_task, .ordered_samples = true, }; -- 1.6.2.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |