diff options
Diffstat (limited to 'tools/perf/builtin-kmem.c')
-rw-r--r-- | tools/perf/builtin-kmem.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c index fc21ad79dd83..a85936f09f3e 100644 --- a/tools/perf/builtin-kmem.c +++ b/tools/perf/builtin-kmem.c | |||
@@ -342,22 +342,10 @@ static int process_sample_event(event_t *event, struct perf_session *session) | |||
342 | return 0; | 342 | return 0; |
343 | } | 343 | } |
344 | 344 | ||
345 | static int sample_type_check(struct perf_session *session) | ||
346 | { | ||
347 | if (!(session->sample_type & PERF_SAMPLE_RAW)) { | ||
348 | fprintf(stderr, | ||
349 | "No trace sample to read. Did you call perf record " | ||
350 | "without -R?"); | ||
351 | return -1; | ||
352 | } | ||
353 | |||
354 | return 0; | ||
355 | } | ||
356 | |||
357 | static struct perf_event_ops event_ops = { | 345 | static struct perf_event_ops event_ops = { |
358 | .process_sample_event = process_sample_event, | 346 | .process_sample_event = process_sample_event, |
359 | .process_comm_event = event__process_comm, | 347 | .process_comm_event = event__process_comm, |
360 | .sample_type_check = sample_type_check, | 348 | .sample_type_check = perf_session__has_traces, |
361 | }; | 349 | }; |
362 | 350 | ||
363 | static double fragmentation(unsigned long n_req, unsigned long n_alloc) | 351 | static double fragmentation(unsigned long n_req, unsigned long n_alloc) |