diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-08-17 17:07:49 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-17 18:00:18 -0400 |
commit | 4bf2364a951d3c043e132e4451d90c7bc74dee83 (patch) | |
tree | 601f1b7147a0f498d704b464a4d43add530ae8b4 /tools/perf | |
parent | 6ede59c412579303a25c11f93d4d262e100fc7e6 (diff) |
perf tools: Warn while running perf trace without sample
When a user runs perf trace using an input with logged
counters without PERF_SAMPLE_RAW attribute, warn by giving a
nice tip.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <1250543271-8383-2-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/builtin-trace.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index b160a9f61bf3..88eef71bce6d 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -184,6 +184,10 @@ static int __cmd_trace(void) | |||
184 | header = perf_header__read(input); | 184 | header = perf_header__read(input); |
185 | sample_type = perf_header__sample_type(header); | 185 | sample_type = perf_header__sample_type(header); |
186 | 186 | ||
187 | if (!(sample_type & PERF_SAMPLE_RAW)) | ||
188 | die("No trace sample to read. Did you call perf record " | ||
189 | "without -R?"); | ||
190 | |||
187 | if (load_kernel() < 0) { | 191 | if (load_kernel() < 0) { |
188 | perror("failed to load kernel symbols"); | 192 | perror("failed to load kernel symbols"); |
189 | return EXIT_FAILURE; | 193 | return EXIT_FAILURE; |