diff options
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 7e3d6e310bf8..ebfc7cf5f63b 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -801,12 +801,12 @@ static void perf_event__process_sample(const union perf_event *event, | |||
801 | } | 801 | } |
802 | } | 802 | } |
803 | 803 | ||
804 | static void perf_session__mmap_read_cpu(struct perf_session *self, int cpu) | 804 | static void perf_session__mmap_read_idx(struct perf_session *self, int idx) |
805 | { | 805 | { |
806 | struct perf_sample sample; | 806 | struct perf_sample sample; |
807 | union perf_event *event; | 807 | union perf_event *event; |
808 | 808 | ||
809 | while ((event = perf_evlist__read_on_cpu(top.evlist, cpu)) != NULL) { | 809 | while ((event = perf_evlist__mmap_read(top.evlist, idx)) != NULL) { |
810 | perf_session__parse_sample(self, event, &sample); | 810 | perf_session__parse_sample(self, event, &sample); |
811 | 811 | ||
812 | if (event->header.type == PERF_RECORD_SAMPLE) | 812 | if (event->header.type == PERF_RECORD_SAMPLE) |
@@ -820,8 +820,8 @@ static void perf_session__mmap_read(struct perf_session *self) | |||
820 | { | 820 | { |
821 | int i; | 821 | int i; |
822 | 822 | ||
823 | for (i = 0; i < top.evlist->cpus->nr; i++) | 823 | for (i = 0; i < top.evlist->nr_mmaps; i++) |
824 | perf_session__mmap_read_cpu(self, i); | 824 | perf_session__mmap_read_idx(self, i); |
825 | } | 825 | } |
826 | 826 | ||
827 | static void start_counters(struct perf_evlist *evlist) | 827 | static void start_counters(struct perf_evlist *evlist) |