diff options
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r-- | tools/perf/util/evsel.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 618d41140abd..6d4a5f6ed75a 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c | |||
@@ -404,8 +404,8 @@ const char *perf_evsel__name(struct perf_evsel *evsel) | |||
404 | return evsel->name ?: "unknown"; | 404 | return evsel->name ?: "unknown"; |
405 | } | 405 | } |
406 | 406 | ||
407 | void perf_evsel__config(struct perf_evsel *evsel, struct perf_record_opts *opts, | 407 | void perf_evsel__config(struct perf_evsel *evsel, |
408 | struct perf_evsel *first) | 408 | struct perf_record_opts *opts) |
409 | { | 409 | { |
410 | struct perf_event_attr *attr = &evsel->attr; | 410 | struct perf_event_attr *attr = &evsel->attr; |
411 | int track = !evsel->idx; /* only the first counter needs these */ | 411 | int track = !evsel->idx; /* only the first counter needs these */ |
@@ -486,10 +486,8 @@ void perf_evsel__config(struct perf_evsel *evsel, struct perf_record_opts *opts, | |||
486 | attr->mmap = track; | 486 | attr->mmap = track; |
487 | attr->comm = track; | 487 | attr->comm = track; |
488 | 488 | ||
489 | if (perf_target__none(&opts->target) && | 489 | if (perf_target__none(&opts->target) && (!evsel->leader)) |
490 | (!opts->group || evsel == first)) { | ||
491 | attr->enable_on_exec = 1; | 490 | attr->enable_on_exec = 1; |
492 | } | ||
493 | } | 491 | } |
494 | 492 | ||
495 | int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads) | 493 | int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads) |