diff options
Diffstat (limited to 'tools/perf/builtin-sched.c')
-rw-r--r-- | tools/perf/builtin-sched.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 80209df6cfe8..d65098c42990 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c | |||
@@ -1653,23 +1653,11 @@ static int process_lost_event(event_t *event __used, | |||
1653 | return 0; | 1653 | return 0; |
1654 | } | 1654 | } |
1655 | 1655 | ||
1656 | static int sample_type_check(struct perf_session *session __used) | ||
1657 | { | ||
1658 | if (!(session->sample_type & PERF_SAMPLE_RAW)) { | ||
1659 | fprintf(stderr, | ||
1660 | "No trace sample to read. Did you call perf record " | ||
1661 | "without -R?"); | ||
1662 | return -1; | ||
1663 | } | ||
1664 | |||
1665 | return 0; | ||
1666 | } | ||
1667 | |||
1668 | static struct perf_event_ops event_ops = { | 1656 | static struct perf_event_ops event_ops = { |
1669 | .process_sample_event = process_sample_event, | 1657 | .process_sample_event = process_sample_event, |
1670 | .process_comm_event = event__process_comm, | 1658 | .process_comm_event = event__process_comm, |
1671 | .process_lost_event = process_lost_event, | 1659 | .process_lost_event = process_lost_event, |
1672 | .sample_type_check = sample_type_check, | 1660 | .sample_type_check = perf_session__has_traces, |
1673 | }; | 1661 | }; |
1674 | 1662 | ||
1675 | static int read_events(void) | 1663 | static int read_events(void) |