diff options
Diffstat (limited to 'tools/perf/tests/sw-clock.c')
-rw-r--r-- | tools/perf/tests/sw-clock.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c index 2e41e2d32ccc..6e2b44ec0749 100644 --- a/tools/perf/tests/sw-clock.c +++ b/tools/perf/tests/sw-clock.c | |||
@@ -78,7 +78,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id) | |||
78 | struct perf_sample sample; | 78 | struct perf_sample sample; |
79 | 79 | ||
80 | if (event->header.type != PERF_RECORD_SAMPLE) | 80 | if (event->header.type != PERF_RECORD_SAMPLE) |
81 | continue; | 81 | goto next_event; |
82 | 82 | ||
83 | err = perf_evlist__parse_sample(evlist, event, &sample); | 83 | err = perf_evlist__parse_sample(evlist, event, &sample); |
84 | if (err < 0) { | 84 | if (err < 0) { |
@@ -88,6 +88,8 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id) | |||
88 | 88 | ||
89 | total_periods += sample.period; | 89 | total_periods += sample.period; |
90 | nr_samples++; | 90 | nr_samples++; |
91 | next_event: | ||
92 | perf_evlist__mmap_consume(evlist, 0); | ||
91 | } | 93 | } |
92 | 94 | ||
93 | if ((u64) nr_samples == total_periods) { | 95 | if ((u64) nr_samples == total_periods) { |