summaryrefslogtreecommitdiff
path: root/tools/perf/tests/rdpmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests/rdpmc.c')
-rw-r--r--tools/perf/tests/rdpmc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/tests/rdpmc.c b/tools/perf/tests/rdpmc.c
index 46649c2..ff94886 100644
--- a/tools/perf/tests/rdpmc.c
+++ b/tools/perf/tests/rdpmc.c
@@ -9,6 +9,8 @@
#if defined(__x86_64__) || defined(__i386__)
+#define barrier() asm volatile("" ::: "memory")
+
static u64 rdpmc(unsigned int counter)
{
unsigned int low, high;