summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-test.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-01-21 15:46:41 (GMT)
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-01-24 15:17:56 (GMT)
commitd0dd74e853a0a6f37e8061d6d50be41c7034c54c (patch)
tree1292a98711611cbc4595785ed17605f20a90800c /tools/perf/builtin-test.c
parentfd78260b5376173faeb17127bd63b3c99a8e8bfb (diff)
downloadlinux-d0dd74e853a0a6f37e8061d6d50be41c7034c54c.tar.xz
perf tools: Move event__parse_sample to evsel.c
To avoid linking more stuff in the python binding I'm working on, future csets will make the sample type be taken from the evsel itself, but for that we need to first have one file per cpu and per sample_type, not a single perf.data file. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> 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.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/tools/perf/builtin-test.c b/tools/perf/builtin-test.c
index dc91ee0..231e3e2 100644
--- a/tools/perf/builtin-test.c
+++ b/tools/perf/builtin-test.c
@@ -10,7 +10,6 @@
#include "util/evlist.h"
#include "util/parse-options.h"
#include "util/parse-events.h"
-#include "util/session.h"
#include "util/symbol.h"
#include "util/thread_map.h"
@@ -457,7 +456,6 @@ static int test__basic_mmap(void)
int err = -1;
event_t *event;
struct thread_map *threads;
- struct perf_session session;
struct cpu_map *cpus;
struct perf_evlist *evlist;
struct perf_event_attr attr = {
@@ -521,13 +519,6 @@ static int test__basic_mmap(void)
attr.wakeup_events = 1;
attr.sample_period = 1;
- /*
- * FIXME: use evsel->attr.sample_type in event__parse_sample.
- * This will nicely remove the requirement that we have
- * all the events with the same sample_type.
- */
- session.sample_type = attr.sample_type;
-
for (i = 0; i < nsyscalls; ++i) {
attr.config = ids[i];
evsels[i] = perf_evsel__new(&attr, i);
@@ -567,7 +558,7 @@ static int test__basic_mmap(void)
goto out_munmap;
}
- event__parse_sample(event, &session, &sample);
+ event__parse_sample(event, attr.sample_type, false, &sample);
evsel = perf_evlist__id2evsel(evlist, sample.id);
if (evsel == NULL) {
pr_debug("event with id %" PRIu64