diff options
Diffstat (limited to 'tools/perf/tests/bpf.c')
-rw-r--r-- | tools/perf/tests/bpf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c index 1eb0bffaed6c..5d20bf8397f0 100644 --- a/tools/perf/tests/bpf.c +++ b/tools/perf/tests/bpf.c @@ -15,6 +15,7 @@ #include <linux/string.h> #include <api/fs/fs.h> #include <bpf/bpf.h> +#include <perf/mmap.h> #include "tests.h" #include "llvm.h" #include "debug.h" @@ -184,16 +185,16 @@ static int do_test(struct bpf_object *obj, int (*func)(void), struct mmap *md; md = &evlist->mmap[i]; - if (perf_mmap__read_init(md) < 0) + if (perf_mmap__read_init(&md->core) < 0) continue; - while ((event = perf_mmap__read_event(md)) != NULL) { + while ((event = perf_mmap__read_event(&md->core)) != NULL) { const u32 type = event->header.type; if (type == PERF_RECORD_SAMPLE) count ++; } - perf_mmap__read_done(md); + perf_mmap__read_done(&md->core); } if (count != expect) { |