Commit af64865b authored by Frederic Weisbecker's avatar Frederic Weisbecker

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

This fixes various unresolved pids in perf sched, easily visible
	perf sched record perf bench sched messaging
Signed-off-by: default avatarFrederic Weisbecker <>
Cc: Ingo Molnar <>
Cc: Peter Zijlstra <>
Cc: Arnaldo Carvalho de Melo <>
Cc: Paul Mackerras <>
Cc: Tom Zanussi <>
Cc: Stephane Eranian <>
parent 13eb04fd
......@@ -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,
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