perf evsel: Convert to _is_group_leader method
Convert perf_evsel__is_group_member to perf_evsel__is_group_leader. This is because the most usecases are using negative form to check whether the given evsel is a leader or not and it's IMHO somewhat ambiguous - leader also *is* a member of the group. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1354171126-14387-4-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
2cfda562da
commit
823254edc6
@@ -221,7 +221,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 (perf_evsel__is_group_member(pos))
|
||||
if (!perf_evsel__is_group_leader(pos))
|
||||
continue;
|
||||
for (thread = 0; thread < evlist->threads->nr; thread++)
|
||||
ioctl(FD(pos, cpu, thread),
|
||||
@@ -237,7 +237,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 (perf_evsel__is_group_member(pos))
|
||||
if (!perf_evsel__is_group_leader(pos))
|
||||
continue;
|
||||
for (thread = 0; thread < evlist->threads->nr; thread++)
|
||||
ioctl(FD(pos, cpu, thread),
|
||||
|
Reference in New Issue
Block a user