diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-03-23 09:16:03 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-03-23 09:16:03 +0100 |
commit | c5bc437702b24817cabd65a6a57971ff91a7712c (patch) | |
tree | ecf85a6f3f788d5009cf1136f3a30907e02e8802 /tools/perf/util/evsel.c | |
parent | 6605f9ac69593d480324ba5fa05f64cfebf4db2f (diff) | |
parent | 4bf9ce1b5ecffffeb8b9d7e925bac3e6b10109aa (diff) | |
download | linux-rt-c5bc437702b24817cabd65a6a57971ff91a7712c.tar.gz |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Cleanups and fixes for perf/core:
. Short term fix for 'diff' tool breakage related to perf.data files
with multiple events. From Jiri Olsa
. Cleanup for event id tracepoint reading routine, from Borislav Petkov
. 32-bit compilation fixes from Jiri Olsa
. Event parsing modifier assignment fixes from Jiri Olsa
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r-- | tools/perf/util/evsel.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index f421f7cbc0d3..d9da62a7234f 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -34,7 +34,7 @@ int __perf_evsel__sample_size(u64 sample_type) return size; } -static void hists__init(struct hists *hists) +void hists__init(struct hists *hists) { memset(hists, 0, sizeof(*hists)); hists->entries_in_array[0] = hists->entries_in_array[1] = RB_ROOT; @@ -63,7 +63,8 @@ struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr, int idx) return evsel; } -void perf_evsel__config(struct perf_evsel *evsel, struct perf_record_opts *opts) +void perf_evsel__config(struct perf_evsel *evsel, struct perf_record_opts *opts, + struct perf_evsel *first) { struct perf_event_attr *attr = &evsel->attr; int track = !evsel->idx; /* only the first counter needs these */ @@ -134,7 +135,8 @@ void perf_evsel__config(struct perf_evsel *evsel, struct perf_record_opts *opts) attr->mmap = track; attr->comm = track; - if (!opts->target_pid && !opts->target_tid && !opts->system_wide) { + if (!opts->target_pid && !opts->target_tid && !opts->system_wide && + (!opts->group || evsel == first)) { attr->disabled = 1; attr->enable_on_exec = 1; } |