diff options
Diffstat (limited to 'tools/perf/builtin-sched.c')
-rw-r--r-- | tools/perf/builtin-sched.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 412ae924640a..d67f274adba0 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c | |||
@@ -21,8 +21,6 @@ | |||
21 | 21 | ||
22 | static char const *input_name = "perf.data"; | 22 | static char const *input_name = "perf.data"; |
23 | 23 | ||
24 | static u64 sample_type; | ||
25 | |||
26 | static char default_sort_order[] = "avg, max, switch, runtime"; | 24 | static char default_sort_order[] = "avg, max, switch, runtime"; |
27 | static char *sort_order = default_sort_order; | 25 | static char *sort_order = default_sort_order; |
28 | 26 | ||
@@ -1613,7 +1611,7 @@ static int process_sample_event(event_t *event, struct perf_session *session) | |||
1613 | struct sample_data data; | 1611 | struct sample_data data; |
1614 | struct thread *thread; | 1612 | struct thread *thread; |
1615 | 1613 | ||
1616 | if (!(sample_type & PERF_SAMPLE_RAW)) | 1614 | if (!(session->sample_type & PERF_SAMPLE_RAW)) |
1617 | return 0; | 1615 | return 0; |
1618 | 1616 | ||
1619 | memset(&data, 0, sizeof(data)); | 1617 | memset(&data, 0, sizeof(data)); |
@@ -1621,7 +1619,7 @@ static int process_sample_event(event_t *event, struct perf_session *session) | |||
1621 | data.cpu = -1; | 1619 | data.cpu = -1; |
1622 | data.period = -1; | 1620 | data.period = -1; |
1623 | 1621 | ||
1624 | event__parse_sample(event, sample_type, &data); | 1622 | event__parse_sample(event, session->sample_type, &data); |
1625 | 1623 | ||
1626 | dump_printf("(IP, %d): %d/%d: %p period: %Ld\n", | 1624 | dump_printf("(IP, %d): %d/%d: %p period: %Ld\n", |
1627 | event->header.misc, | 1625 | event->header.misc, |
@@ -1655,11 +1653,9 @@ static int process_lost_event(event_t *event __used, | |||
1655 | return 0; | 1653 | return 0; |
1656 | } | 1654 | } |
1657 | 1655 | ||
1658 | static int sample_type_check(u64 type, struct perf_session *session __used) | 1656 | static int sample_type_check(struct perf_session *session __used) |
1659 | { | 1657 | { |
1660 | sample_type = type; | 1658 | if (!(session->sample_type & PERF_SAMPLE_RAW)) { |
1661 | |||
1662 | if (!(sample_type & PERF_SAMPLE_RAW)) { | ||
1663 | fprintf(stderr, | 1659 | fprintf(stderr, |
1664 | "No trace sample to read. Did you call perf record " | 1660 | "No trace sample to read. Did you call perf record " |
1665 | "without -R?"); | 1661 | "without -R?"); |