aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r--tools/perf/builtin-trace.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 574a215e800b..b0ba2ac37e2c 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -103,22 +103,10 @@ static int process_sample_event(event_t *event, struct perf_session *session)
103 return 0; 103 return 0;
104} 104}
105 105
106static int sample_type_check(struct perf_session *session)
107{
108 if (!(session->sample_type & PERF_SAMPLE_RAW)) {
109 fprintf(stderr,
110 "No trace sample to read. Did you call perf record "
111 "without -R?");
112 return -1;
113 }
114
115 return 0;
116}
117
118static struct perf_event_ops event_ops = { 106static struct perf_event_ops event_ops = {
119 .process_sample_event = process_sample_event, 107 .process_sample_event = process_sample_event,
120 .process_comm_event = event__process_comm, 108 .process_comm_event = event__process_comm,
121 .sample_type_check = sample_type_check, 109 .sample_type_check = perf_session__has_traces,
122}; 110};
123 111
124static int __cmd_trace(struct perf_session *session) 112static int __cmd_trace(struct perf_session *session)