diff options
author | Jiri Olsa <[email protected]> | 2012-11-12 18:34:03 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2012-11-14 16:52:15 -0300 |
commit | 3fe4430dd66837d8fcdb63c167e908655fc842e3 (patch) | |
tree | ed2c30417f02a07326410692f8cbbd8b7c069b25 | |
parent | 2711926a416733b853977a0e014c713955ad0d8a (diff) |
perf tools: Omit group members from perf_evlist__disable/enable
There's no need to disable/enable ordinary group member events,
because they are initialy enabled and get scheduled by the leader.
Signed-off-by: Jiri Olsa <[email protected]>
Acked-by: Namhyung Kim <[email protected]>
Cc: Corey Ashford <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/util/evlist.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 04acae0ce697..e9d2d5da2fb8 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -222,6 +222,8 @@ void perf_evlist__disable(struct perf_evlist *evlist) for (cpu = 0; cpu < evlist->cpus->nr; cpu++) { list_for_each_entry(pos, &evlist->entries, node) { + if (pos->leader) + continue; for (thread = 0; thread < evlist->threads->nr; thread++) ioctl(FD(pos, cpu, thread), PERF_EVENT_IOC_DISABLE, 0); @@ -236,6 +238,8 @@ void perf_evlist__enable(struct perf_evlist *evlist) for (cpu = 0; cpu < cpu_map__nr(evlist->cpus); cpu++) { list_for_each_entry(pos, &evlist->entries, node) { + if (pos->leader) + continue; for (thread = 0; thread < evlist->threads->nr; thread++) ioctl(FD(pos, cpu, thread), PERF_EVENT_IOC_ENABLE, 0); |