perf session: Remove sample_type_check from event_ops
This is really something tools need to do before asking for the
events to be processed, leaving perf_session__process_events to
do just that, process events.
Also add a msg parameter to perf_session__has_traces() so that
the right message can be printed, fixing a regression added by
me in the previous cset (right timechart message) and also
fixing 'perf kmem', that was not asking if 'perf kmem record'
was ran.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1261957026-15580-6-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index a6951d2..5771ccb 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -40,7 +40,6 @@
event_op process_read_event;
event_op process_throttle_event;
event_op process_unthrottle_event;
- int (*sample_type_check)(struct perf_session *session);
unsigned long total_unknown;
bool full_paths;
};
@@ -56,7 +55,7 @@
struct ip_callchain *chain,
struct symbol **parent);
-int perf_session__has_traces(struct perf_session *self);
+bool perf_session__has_traces(struct perf_session *self, const char *msg);
int perf_header__read_build_ids(int input, u64 offset, u64 file_size);