diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-09-16 03:06:54 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-09-16 03:06:54 -0400 |
commit | f6cf87f748ff9480f97ff9c5caf6d6faacf52aa1 (patch) | |
tree | 2a26e15d953681fd0527ce9d7e0f9156bdc4e4f4 /tools/perf/util/parse-events.c | |
parent | 91a4dc9f71e4b8f9b8da547d19f80e7be89d7539 (diff) | |
parent | c5e6bd2ed3e81df443e4ae11e95ed71ff77bf9e5 (diff) |
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
- Fix segfault pressing -> in 'perf top' with no hist entries. (Wang Nan)
E.g:
perf top -e page-faults --pid 11400 # 11400 generates no page-fault
- Fix propagation of thread and cpu maps, that got broken when doing incomplete
changes to better support events with a PMU cpu mask, leading to Intel PT to
fail with an error like:
$ perf record -e intel_pt//u uname
Error: The sys_perf_event_open() syscall returned with
22 (Invalid argument) for event (sched:sched_switch).
Because intel_pt adds that sched:sched_switch evsel to the evlist after the
thread/cpu maps were propagated to the evsels, fix it. (Adrian Hunter)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r-- | tools/perf/util/parse-events.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index d826e6f515db..21ed6ee63da9 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c | |||
@@ -287,8 +287,8 @@ __add_event(struct list_head *list, int *idx, | |||
287 | if (!evsel) | 287 | if (!evsel) |
288 | return NULL; | 288 | return NULL; |
289 | 289 | ||
290 | if (cpus) | 290 | evsel->cpus = cpu_map__get(cpus); |
291 | evsel->cpus = cpu_map__get(cpus); | 291 | evsel->own_cpus = cpu_map__get(cpus); |
292 | 292 | ||
293 | if (name) | 293 | if (name) |
294 | evsel->name = strdup(name); | 294 | evsel->name = strdup(name); |
@@ -1140,10 +1140,9 @@ int parse_events(struct perf_evlist *evlist, const char *str, | |||
1140 | ret = parse_events__scanner(str, &data, PE_START_EVENTS); | 1140 | ret = parse_events__scanner(str, &data, PE_START_EVENTS); |
1141 | perf_pmu__parse_cleanup(); | 1141 | perf_pmu__parse_cleanup(); |
1142 | if (!ret) { | 1142 | if (!ret) { |
1143 | int entries = data.idx - evlist->nr_entries; | ||
1144 | struct perf_evsel *last; | 1143 | struct perf_evsel *last; |
1145 | 1144 | ||
1146 | perf_evlist__splice_list_tail(evlist, &data.list, entries); | 1145 | perf_evlist__splice_list_tail(evlist, &data.list); |
1147 | evlist->nr_groups += data.nr_groups; | 1146 | evlist->nr_groups += data.nr_groups; |
1148 | last = perf_evlist__last(evlist); | 1147 | last = perf_evlist__last(evlist); |
1149 | last->cmdline_group_boundary = true; | 1148 | last->cmdline_group_boundary = true; |