From: Namhyung Kim Date: Fri, 16 Mar 2012 08:42:19 +0000 (+0900) Subject: perf stat: Fix event grouping on forked task X-Git-Tag: v3.4-rc1~4^2~7^2~5^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c19ea453d81cf8bd9bd446e6b129998f79997e7;p=pandora-kernel.git perf stat: Fix event grouping on forked task When event group is enabled for forked task (i.e. no target task was specified) all events were disabled and marked ->enable_on_exec. However they are not counted at all since only group leader will be enabled on exec actually. So the result looked like below: $ ./perf stat --group -- sleep 1 Performance counter stats for 'sleep 1': 0.554926 task-clock # 0.001 CPUs utilized context-switches CPU-migrations page-faults cycles stalled-cycles-frontend stalled-cycles-backend instructions branches branch-misses 1.001228093 seconds time elapsed Fix it by disabling group leader only. Cc: Ingo Molnar Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1331887340-32448-1-git-send-email-namhyung.kim@lge.com Signed-off-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed