diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index b160a9f61bf3ba39f69e677952b29203df45e901..88eef71bce6d63f7fd8d338e6979f58b0901d5ec 100644 --- 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;