diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-12-27 21:37:01 -0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-28 09:03:33 +0100 |
commit | 27295592c22e71bbd38110c302da8dbb43912a60 (patch) | |
tree | 01442f9b788e3b0a01bc29e22a0e799e1c45c91d /tools/perf/builtin-timechart.c | |
parent | 4a58e61161074776aa34187ea369414ce4852394 (diff) | |
download | blackbird-op-linux-27295592c22e71bbd38110c302da8dbb43912a60.tar.gz blackbird-op-linux-27295592c22e71bbd38110c302da8dbb43912a60.zip |
perf session: Share the common trace sample_check routine as perf_session__has_traces
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-5-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-timechart.c')
-rw-r--r-- | tools/perf/builtin-timechart.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index a589a43112d6..b42f337c17d9 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c @@ -1029,23 +1029,12 @@ static void process_samples(struct perf_session *session) } } -static int sample_type_check(struct perf_session *session) -{ - if (!(session->sample_type & PERF_SAMPLE_RAW)) { - fprintf(stderr, "No trace samples found in the file.\n" - "Have you used 'perf timechart record' to record it?\n"); - return -1; - } - - return 0; -} - static struct perf_event_ops event_ops = { .process_comm_event = process_comm_event, .process_fork_event = process_fork_event, .process_exit_event = process_exit_event, .process_sample_event = queue_sample_event, - .sample_type_check = sample_type_check, + .sample_type_check = perf_session__has_traces, }; static int __cmd_timechart(void) |