libperf: Add 'refcnt' to struct perf_mmap

Move 'refcnt' from tools/perf's mmap to libperf's perf_mmap struct.

Committer notes:

Add the refcount.h include directive here, now it is needed.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lore.kernel.org/lkml/20190913132355.21634-15-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Jiri Olsa
2019-07-27 22:35:35 +02:00
committed by Arnaldo Carvalho de Melo
parent 56a94706cd
commit e03edfeac0
4 changed files with 13 additions and 11 deletions

View File

@@ -2,6 +2,8 @@
#ifndef __LIBPERF_INTERNAL_MMAP_H
#define __LIBPERF_INTERNAL_MMAP_H
#include <linux/refcount.h>
/**
* struct perf_mmap - perf's ring buffer mmap details
*
@@ -12,6 +14,7 @@ struct perf_mmap {
int mask;
int fd;
int cpu;
refcount_t refcnt;
};
#endif /* __LIBPERF_INTERNAL_MMAP_H */