diff options
Diffstat (limited to 'tools/perf/builtin-kmem.c')
| -rw-r--r-- | tools/perf/builtin-kmem.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c index 3b329c66b505..dda60869faad 100644 --- a/tools/perf/builtin-kmem.c +++ b/tools/perf/builtin-kmem.c | |||
| @@ -20,8 +20,6 @@ typedef int (*sort_fn_t)(struct alloc_stat *, struct alloc_stat *); | |||
| 20 | 20 | ||
| 21 | static char const *input_name = "perf.data"; | 21 | static char const *input_name = "perf.data"; |
| 22 | 22 | ||
| 23 | static u64 sample_type; | ||
| 24 | |||
| 25 | static int alloc_flag; | 23 | static int alloc_flag; |
| 26 | static int caller_flag; | 24 | static int caller_flag; |
| 27 | 25 | ||
| @@ -321,7 +319,7 @@ static int process_sample_event(event_t *event, struct perf_session *session) | |||
| 321 | data.cpu = -1; | 319 | data.cpu = -1; |
| 322 | data.period = 1; | 320 | data.period = 1; |
| 323 | 321 | ||
| 324 | event__parse_sample(event, sample_type, &data); | 322 | event__parse_sample(event, session->sample_type, &data); |
| 325 | 323 | ||
| 326 | dump_printf("(IP, %d): %d/%d: %p period: %Ld\n", | 324 | dump_printf("(IP, %d): %d/%d: %p period: %Ld\n", |
| 327 | event->header.misc, | 325 | event->header.misc, |
| @@ -344,11 +342,9 @@ static int process_sample_event(event_t *event, struct perf_session *session) | |||
| 344 | return 0; | 342 | return 0; |
| 345 | } | 343 | } |
| 346 | 344 | ||
| 347 | static int sample_type_check(u64 type, struct perf_session *session __used) | 345 | static int sample_type_check(struct perf_session *session) |
| 348 | { | 346 | { |
| 349 | sample_type = type; | 347 | if (!(session->sample_type & PERF_SAMPLE_RAW)) { |
| 350 | |||
| 351 | if (!(sample_type & PERF_SAMPLE_RAW)) { | ||
| 352 | fprintf(stderr, | 348 | fprintf(stderr, |
| 353 | "No trace sample to read. Did you call perf record " | 349 | "No trace sample to read. Did you call perf record " |
| 354 | "without -R?"); | 350 | "without -R?"); |
