aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/builtin-test.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-05-22 10:07:37 +0200
committerIngo Molnar <mingo@elte.hu>2011-05-22 10:10:01 +0200
commit3ac1bbcf13c56a19927df670f429eb0c3c11f8e5 (patch)
tree693e2b7f1a9cb0c6ed6d44375e370e1ae08c7ac9 /tools/perf/builtin-test.c
parenta2d063ac216c1618bfc2b4d40b7176adffa63511 (diff)
parent5538becaec9ca2ff21e7826372941dc46f498487 (diff)
Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into perf/urgent
Conflicts: tools/perf/builtin-top.c Semantic conflict: util/include/linux/list.h # fix prefetch.h removal fallout Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-test.c')
-rw-r--r--tools/perf/builtin-test.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/builtin-test.c b/tools/perf/builtin-test.c
index 2f9a337b182..b67186228c8 100644
--- a/tools/perf/builtin-test.c
+++ b/tools/perf/builtin-test.c
@@ -474,6 +474,7 @@ static int test__basic_mmap(void)
unsigned int nr_events[nsyscalls],
expected_nr_events[nsyscalls], i, j;
struct perf_evsel *evsels[nsyscalls], *evsel;
+ int sample_size = perf_sample_size(attr.sample_type);
for (i = 0; i < nsyscalls; ++i) {
char name[64];
@@ -558,7 +559,13 @@ static int test__basic_mmap(void)
goto out_munmap;
}
- perf_event__parse_sample(event, attr.sample_type, false, &sample);
+ err = perf_event__parse_sample(event, attr.sample_type, sample_size,
+ false, &sample);
+ if (err) {
+ pr_err("Can't parse sample, err = %d\n", err);
+ goto out_munmap;
+ }
+
evsel = perf_evlist__id2evsel(evlist, sample.id);
if (evsel == NULL) {
pr_debug("event with id %" PRIu64