]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Fix synthesizing fork_event.ppid for non-main thread
authorDavid Ahern <david.ahern@oracle.com>
Thu, 9 Apr 2015 16:48:27 +0000 (12:48 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 10 Apr 2015 13:10:55 +0000 (10:10 -0300)
commitf114f973b6764a8466723e19f8173c685568a009
treeaee1436f97de4571d4a490307808e736af02d6fb
parent2fab30ef891c5f64dc66a73550a85748c765051a
perf tools: Fix synthesizing fork_event.ppid for non-main thread

Commit fa16db738c1 sets the ppid based on what is read from the
/proc/pid/status file when synthesizing fork events.

This is correct thing to do for new processes but not threads of a
process.

Fix ppid for threads to be the main thread when synthesizing fork events
(ie., assume main thread spawned all sub-threads in a process).

Reported-by: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Signed-off-by: David Ahern <david.ahern@oracle.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Don Zickus <dzickus@redhat.com>
Link: http://lkml.kernel.org/r/1428598107-178999-1-git-send-email-david.ahern@oracle.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/event.c