diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-11-13 17:27:28 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-11-14 16:53:45 -0300 |
commit | 07ac002f2fcc74c5be47b656d9201d5de84dc53d (patch) | |
tree | 6f43107a76ed87f2b817594d2d62246ab82cfba6 /tools/perf/util/evlist.c | |
parent | 1483c2ae90738e7453bfe446a3bbcdd0ba9abf36 (diff) | |
download | op-kernel-dev-07ac002f2fcc74c5be47b656d9201d5de84dc53d.zip op-kernel-dev-07ac002f2fcc74c5be47b656d9201d5de84dc53d.tar.gz |
perf evsel: Introduce is_group_member method
To clarify what is being tested, instead of assuming that evsel->leader
== NULL means either an 'isolated' evsel or a 'group leader'.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-lvdbvimaxw9nc5een5vmem0c@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evlist.c')
-rw-r--r-- | tools/perf/util/evlist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index e9d2d5d..7052934 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -222,7 +222,7 @@ 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) + if (perf_evsel__is_group_member(pos)) continue; for (thread = 0; thread < evlist->threads->nr; thread++) ioctl(FD(pos, cpu, thread), @@ -238,7 +238,7 @@ 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) + if (perf_evsel__is_group_member(pos)) continue; for (thread = 0; thread < evlist->threads->nr; thread++) ioctl(FD(pos, cpu, thread), |