summaryrefslogtreecommitdiff
path: root/tools/perf/tests/code-reading.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-11-12 21:47:31 +0100
committerIngo Molnar <mingo@kernel.org>2013-11-12 21:48:38 +0100
commitd969135aae1434547f41853f0e8eaa622e8b8816 (patch)
tree2b790ec0967620423e227c49873f06812b325037 /tools/perf/tests/code-reading.c
parent9b66bfb28049594fe2bb2b91607ba302f511ce8b (diff)
parent0497a9ebaf7ae4d573497b3e053ad4c3d5c9921d (diff)
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: * Add summary only option to 'perf trace', suppressing the decoding of events, from David Ahern * 'perf trace --summary' formatting simplifications, from Pekka Emberg. * Beautify fifth argument of mmap() as fd, in 'perf trace', from Namhyung Kim. * Fix segfault on perf trace -i perf.data, from Namhyung Kim. * Fix segfault with --no-mmap-pages, from David Ahern. * Round mmap pages to power 2, from David Ahern. * Add direct access to dynamic arrays in libtraceevent, from Steven Rostedt. * Handle throttle events in 'object code reading' test, fix from Adrian Hunter. * Prevent condition that all sort keys are elided, fix from Namhyung Kim. * Synthesize non-exec MMAP records when --data used, allowing the resolution of data addresses to symbols (global variables, etc). * Don't force a refresh during progress update in the TUI, greatly reducing startup costs, fix from Patrick Palka. * Fix sw clock event period test wrt not checking if using > max_sample_freq. * Code cleanups by David Ahern and 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/tests/code-reading.c')
-rw-r--r--tools/perf/tests/code-reading.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 49ccc3b2995e..85d4919dd623 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -275,8 +275,19 @@ static int process_event(struct machine *machine, struct perf_evlist *evlist,
if (event->header.type == PERF_RECORD_SAMPLE)
return process_sample_event(machine, evlist, event, state);
- if (event->header.type < PERF_RECORD_MAX)
- return machine__process_event(machine, event, NULL);
+ if (event->header.type == PERF_RECORD_THROTTLE ||
+ event->header.type == PERF_RECORD_UNTHROTTLE)
+ return 0;
+
+ if (event->header.type < PERF_RECORD_MAX) {
+ int ret;
+
+ ret = machine__process_event(machine, event, NULL);
+ if (ret < 0)
+ pr_debug("machine__process_event failed, event type %u\n",
+ event->header.type);
+ return ret;
+ }
return 0;
}
@@ -441,7 +452,7 @@ static int do_test_code_reading(bool try_kcore)
}
ret = perf_event__synthesize_thread_map(NULL, threads,
- perf_event__process, machine);
+ perf_event__process, machine, false);
if (ret < 0) {
pr_debug("perf_event__synthesize_thread_map failed\n");
goto out_err;