blob: ebf5b93754fdfa39b216e041000edb93337146c0 [file] [log] [blame]
Jiri Olsa547740f2019-07-27 22:07:44 +02001/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __LIBPERF_INTERNAL_MMAP_H
3#define __LIBPERF_INTERNAL_MMAP_H
4
Jiri Olsae03edfe2019-07-27 22:35:35 +02005#include <linux/refcount.h>
Jiri Olsaebe4d722019-07-27 22:39:53 +02006#include <linux/types.h>
Jiri Olsae03edfe2019-07-27 22:35:35 +02007
Jiri Olsa547740f2019-07-27 22:07:44 +02008/**
9 * struct perf_mmap - perf's ring buffer mmap details
10 *
11 * @refcnt - e.g. code using PERF_EVENT_IOC_SET_OUTPUT to share this
12 */
13struct perf_mmap {
14 void *base;
Jiri Olsa4fd0cef2019-07-27 22:27:55 +020015 int mask;
Jiri Olsa2cf07b22019-07-27 22:31:17 +020016 int fd;
Jiri Olsa56a94702019-07-27 22:33:20 +020017 int cpu;
Jiri Olsae03edfe2019-07-27 22:35:35 +020018 refcount_t refcnt;
Jiri Olsaebe4d722019-07-27 22:39:53 +020019 u64 prev;
20 u64 start;
21 u64 end;
Jiri Olsa547740f2019-07-27 22:07:44 +020022};
23
24#endif /* __LIBPERF_INTERNAL_MMAP_H */