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/evsel.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/evsel.c')
-rw-r--r-- | tools/perf/util/evsel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 7e93418a45d1..bb58b05f905f 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c | |||
@@ -520,14 +520,14 @@ void perf_evsel__config(struct perf_evsel *evsel, | |||
520 | * Disabling only independent events or group leaders, | 520 | * Disabling only independent events or group leaders, |
521 | * keeping group members enabled. | 521 | * keeping group members enabled. |
522 | */ | 522 | */ |
523 | if (!perf_evsel__is_group_member(evsel)) | 523 | if (perf_evsel__is_group_leader(evsel)) |
524 | attr->disabled = 1; | 524 | attr->disabled = 1; |
525 | 525 | ||
526 | /* | 526 | /* |
527 | * Setting enable_on_exec for independent events and | 527 | * Setting enable_on_exec for independent events and |
528 | * group leaders for traced executed by perf. | 528 | * group leaders for traced executed by perf. |
529 | */ | 529 | */ |
530 | if (perf_target__none(&opts->target) && !perf_evsel__is_group_member(evsel)) | 530 | if (perf_target__none(&opts->target) && perf_evsel__is_group_leader(evsel)) |
531 | attr->enable_on_exec = 1; | 531 | attr->enable_on_exec = 1; |
532 | } | 532 | } |
533 | 533 | ||
@@ -708,7 +708,7 @@ static int get_group_fd(struct perf_evsel *evsel, int cpu, int thread) | |||
708 | struct perf_evsel *leader = evsel->leader; | 708 | struct perf_evsel *leader = evsel->leader; |
709 | int fd; | 709 | int fd; |
710 | 710 | ||
711 | if (!perf_evsel__is_group_member(evsel)) | 711 | if (perf_evsel__is_group_leader(evsel)) |
712 | return -1; | 712 | return -1; |
713 | 713 | ||
714 | /* | 714 | /* |