aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evsel.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r--tools/perf/util/evsel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index fc4faaa7afb9..1fb636c550a1 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -519,14 +519,14 @@ void perf_evsel__config(struct perf_evsel *evsel,
519 * Disabling only independent events or group leaders, 519 * Disabling only independent events or group leaders,
520 * keeping group members enabled. 520 * keeping group members enabled.
521 */ 521 */
522 if (!evsel->leader) 522 if (!perf_evsel__is_group_member(evsel))
523 attr->disabled = 1; 523 attr->disabled = 1;
524 524
525 /* 525 /*
526 * Setting enable_on_exec for independent events and 526 * Setting enable_on_exec for independent events and
527 * group leaders for traced executed by perf. 527 * group leaders for traced executed by perf.
528 */ 528 */
529 if (perf_target__none(&opts->target) && (!evsel->leader)) 529 if (perf_target__none(&opts->target) && !perf_evsel__is_group_member(evsel))
530 attr->enable_on_exec = 1; 530 attr->enable_on_exec = 1;
531} 531}
532 532
@@ -707,7 +707,7 @@ static int get_group_fd(struct perf_evsel *evsel, int cpu, int thread)
707 struct perf_evsel *leader = evsel->leader; 707 struct perf_evsel *leader = evsel->leader;
708 int fd; 708 int fd;
709 709
710 if (!leader) 710 if (!perf_evsel__is_group_member(evsel))
711 return -1; 711 return -1;
712 712
713 /* 713 /*