|
@@ -31,10 +31,12 @@ static int count_samples(struct perf_evlist *evlist, int *sample_count,
|
|
|
int i;
|
|
|
|
|
|
for (i = 0; i < evlist->nr_mmaps; i++) {
|
|
|
+ struct perf_mmap *map = &evlist->overwrite_mmap[i];
|
|
|
union perf_event *event;
|
|
|
+ u64 start, end;
|
|
|
|
|
|
- perf_mmap__read_catchup(&evlist->overwrite_mmap[i]);
|
|
|
- while ((event = perf_mmap__read_backward(&evlist->overwrite_mmap[i])) != NULL) {
|
|
|
+ perf_mmap__read_init(map, true, &start, &end);
|
|
|
+ while ((event = perf_mmap__read_event(map, true, &start, end)) != NULL) {
|
|
|
const u32 type = event->header.type;
|
|
|
|
|
|
switch (type) {
|
|
@@ -49,6 +51,7 @@ static int count_samples(struct perf_evlist *evlist, int *sample_count,
|
|
|
return TEST_FAIL;
|
|
|
}
|
|
|
}
|
|
|
+ perf_mmap__read_done(map);
|
|
|
}
|
|
|
return TEST_OK;
|
|
|
}
|