diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-02 16:42:57 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-02 16:42:57 +0200 |
commit | cb0b29e0861659c9eef9664772cd7e845ba1104a (patch) | |
tree | a53dd1ebccef16cb9e7873aa76566ab339fb73ff /tools/perf/builtin-test.c | |
parent | perf session: Use perf_evlist__id_hdr_size more extensively (diff) | |
download | linux-cb0b29e0861659c9eef9664772cd7e845ba1104a.tar.xz linux-cb0b29e0861659c9eef9664772cd7e845ba1104a.zip |
perf evlist: Introduce perf_evlist__parse_sample
That is a more compact form of perf_session__parse_sample and to support
multiple evlists per perf_session is the way to go anyway.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-vkxx3j5qktoj11bvcwmfjj13@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-test.c')
-rw-r--r-- | tools/perf/builtin-test.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/perf/builtin-test.c b/tools/perf/builtin-test.c index e5032ed2f259..1d592f5cbea9 100644 --- a/tools/perf/builtin-test.c +++ b/tools/perf/builtin-test.c @@ -562,9 +562,7 @@ static int test__basic_mmap(void) goto out_munmap; } - err = perf_event__parse_sample(event, attr.sample_type, - evsels[0]->sample_size, - false, &sample, false); + err = perf_evlist__parse_sample(evlist, event, &sample, false); if (err) { pr_err("Can't parse sample, err = %d\n", err); goto out_munmap; @@ -781,9 +779,7 @@ static int test__PERF_RECORD(void) if (type < PERF_RECORD_MAX) nr_events[type]++; - err = perf_event__parse_sample(event, evsel->attr.sample_type, - evsel->sample_size, true, - &sample, false); + err = perf_evlist__parse_sample(evlist, event, &sample, false); if (err < 0) { if (verbose) perf_event__fprintf(event, stderr); |