summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evlist.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo2015-05-15 20:45:16 +0200
committerArnaldo Carvalho de Melo2015-05-15 20:45:16 +0200
commit7143849a5d6a5c623d81790d92f0033507c5b14f (patch)
tree84fc1c5b579a62990528e38ccb71bc5d2f7df8c8 /tools/perf/util/evlist.h
parentperf machine: Stop accessing atomic_t::counter directly (diff)
downloadkernel-qcow2-linux-7143849a5d6a5c623d81790d92f0033507c5b14f.tar.gz
kernel-qcow2-linux-7143849a5d6a5c623d81790d92f0033507c5b14f.tar.xz
kernel-qcow2-linux-7143849a5d6a5c623d81790d92f0033507c5b14f.zip
perf evlist: Use atomic.h for the perf_mmap refcount
Now that we have atomic.h, we should convert all of the existing refcounts to use it. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: David Ahern <dsahern@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-qhpv2etncj3hfofgj1aitkyv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evlist.h')
-rw-r--r--tools/perf/util/evlist.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
index c07b1a94a724..670e7f2114b1 100644
--- a/tools/perf/util/evlist.h
+++ b/tools/perf/util/evlist.h
@@ -1,6 +1,7 @@
#ifndef __PERF_EVLIST_H
#define __PERF_EVLIST_H 1
+#include <linux/atomic.h>
#include <linux/list.h>
#include <api/fd/array.h>
#include <stdio.h>
@@ -27,7 +28,7 @@ struct record_opts;
struct perf_mmap {
void *base;
int mask;
- int refcnt;
+ atomic_t refcnt;
u64 prev;
struct auxtrace_mmap auxtrace_mmap;
char event_copy[PERF_SAMPLE_MAX_SIZE] __attribute__((aligned(8)));