projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ede59c
)
perf tools: Warn while running perf trace without sample
author
Frederic Weisbecker
<
[email protected]
>
Mon, 17 Aug 2009 21:07:49 +0000
(23:07 +0200)
committer
Ingo Molnar
<
[email protected]
>
Mon, 17 Aug 2009 22:00:18 +0000
(
00:00
+0200)
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 <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Arnaldo Carvalho de Melo <
[email protected]
>
Cc: Mike Galbraith <
[email protected]
>
Cc: Steven Rostedt <
[email protected]
>
LKML-Reference: <
1250543271
[email protected]
>
Signed-off-by: Ingo Molnar <
[email protected]
>
tools/perf/builtin-trace.c
patch
|
blob
|
history
diff --git
a/tools/perf/builtin-trace.c
b/tools/perf/builtin-trace.c
index b160a9f61bf3ba39f69e677952b29203df45e901..88eef71bce6d63f7fd8d338e6979f58b0901d5ec 100644
(file)
--- a/
tools/perf/builtin-trace.c
+++ b/
tools/perf/builtin-trace.c
@@
-184,6
+184,10
@@
static int __cmd_trace(void)
header = perf_header__read(input);
sample_type = perf_header__sample_type(header);
+ if (!(sample_type & PERF_SAMPLE_RAW))
+ die("No trace sample to read. Did you call perf record "
+ "without -R?");
+
if (load_kernel() < 0) {
perror("failed to load kernel symbols");
return EXIT_FAILURE;