diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2012-11-29 01:38:30 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-12-09 06:46:06 -0500 |
commit | 823254edc66eb44bf612b1dfa4829afa9840f691 (patch) | |
tree | 50f6c26d96228717f35dbf989ca0534bbda9ca11 /tools/perf/util/evlist.c | |
parent | 2cfda562da7b0b1e0575507ef3efe782d4e218e4 (diff) |
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>
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 90db2a14e4bb..d0e1e821fe85 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c | |||
@@ -221,7 +221,7 @@ void perf_evlist__disable(struct perf_evlist *evlist) | |||
221 | 221 | ||
222 | for (cpu = 0; cpu < evlist->cpus->nr; cpu++) { | 222 | for (cpu = 0; cpu < evlist->cpus->nr; cpu++) { |
223 | list_for_each_entry(pos, &evlist->entries, node) { | 223 | list_for_each_entry(pos, &evlist->entries, node) { |
224 | if (perf_evsel__is_group_member(pos)) | 224 | if (!perf_evsel__is_group_leader(pos)) |
225 | continue; | 225 | continue; |
226 | for (thread = 0; thread < evlist->threads->nr; thread++) | 226 | for (thread = 0; thread < evlist->threads->nr; thread++) |
227 | ioctl(FD(pos, cpu, thread), | 227 | ioctl(FD(pos, cpu, thread), |
@@ -237,7 +237,7 @@ void perf_evlist__enable(struct perf_evlist *evlist) | |||
237 | 237 | ||
238 | for (cpu = 0; cpu < cpu_map__nr(evlist->cpus); cpu++) { | 238 | for (cpu = 0; cpu < cpu_map__nr(evlist->cpus); cpu++) { |
239 | list_for_each_entry(pos, &evlist->entries, node) { | 239 | list_for_each_entry(pos, &evlist->entries, node) { |
240 | if (perf_evsel__is_group_member(pos)) | 240 | if (!perf_evsel__is_group_leader(pos)) |
241 | continue; | 241 | continue; |
242 | for (thread = 0; thread < evlist->threads->nr; thread++) | 242 | for (thread = 0; thread < evlist->threads->nr; thread++) |
243 | ioctl(FD(pos, cpu, thread), | 243 | ioctl(FD(pos, cpu, thread), |