perf: Do the comm inheritance per thread in event__process_task
authorFrederic Weisbecker <fweisbec@gmail.com>
Mon, 31 May 2010 22:43:07 +0000 (00:43 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Mon, 31 May 2010 22:43:07 +0000 (00:43 +0200)
commitdd833d713ccc79e00176eb1b3a6c65638c44e27b
tree96f04a64e8d67f6dd5fc5f77882fc97ee840ec8b
parentaf64865ba6825e10fe62a3105fea5cadffeb52c6
perf: Do the comm inheritance per thread in event__process_task

event__process_task() doesn't propagate the comm copy on clone,
but only on process fork. So we loose all the tid:comm resolution
for tasks that aren't a main process thread.

Progragate the per thread granularity to event__process_task for
pid resolution.

This fixes various unresolved pids in perf sched, especially when
we trace multithread processes. The problem is quickly reproducible
with the messaging benchmark using the multithread mode "-t" :

perf sched record perf bench sched messaging -t

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>
tools/perf/util/event.c