aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/perf.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/perf.h')
-rw-r--r--tools/perf/perf.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index f53ee0bbee88..2c340e7da458 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -5,8 +5,9 @@ struct winsize;
5 5
6void get_term_dimensions(struct winsize *ws); 6void get_term_dimensions(struct winsize *ws);
7 7
8#include <asm/unistd.h>
9
8#if defined(__i386__) 10#if defined(__i386__)
9#include "../../arch/x86/include/asm/unistd.h"
10#define rmb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory") 11#define rmb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
11#define cpu_relax() asm volatile("rep; nop" ::: "memory"); 12#define cpu_relax() asm volatile("rep; nop" ::: "memory");
12#define CPUINFO_PROC "model name" 13#define CPUINFO_PROC "model name"
@@ -16,7 +17,6 @@ void get_term_dimensions(struct winsize *ws);
16#endif 17#endif
17 18
18#if defined(__x86_64__) 19#if defined(__x86_64__)
19#include "../../arch/x86/include/asm/unistd.h"
20#define rmb() asm volatile("lfence" ::: "memory") 20#define rmb() asm volatile("lfence" ::: "memory")
21#define cpu_relax() asm volatile("rep; nop" ::: "memory"); 21#define cpu_relax() asm volatile("rep; nop" ::: "memory");
22#define CPUINFO_PROC "model name" 22#define CPUINFO_PROC "model name"
@@ -33,13 +33,11 @@ void get_term_dimensions(struct winsize *ws);
33#endif 33#endif
34 34
35#ifdef __s390__ 35#ifdef __s390__
36#include "../../arch/s390/include/asm/unistd.h"
37#define rmb() asm volatile("bcr 15,0" ::: "memory") 36#define rmb() asm volatile("bcr 15,0" ::: "memory")
38#define cpu_relax() asm volatile("" ::: "memory"); 37#define cpu_relax() asm volatile("" ::: "memory");
39#endif 38#endif
40 39
41#ifdef __sh__ 40#ifdef __sh__
42#include "../../arch/sh/include/asm/unistd.h"
43#if defined(__SH4A__) || defined(__SH5__) 41#if defined(__SH4A__) || defined(__SH5__)
44# define rmb() asm volatile("synco" ::: "memory") 42# define rmb() asm volatile("synco" ::: "memory")
45#else 43#else
@@ -50,35 +48,30 @@ void get_term_dimensions(struct winsize *ws);
50#endif 48#endif
51 49
52#ifdef __hppa__ 50#ifdef __hppa__
53#include "../../arch/parisc/include/asm/unistd.h"
54#define rmb() asm volatile("" ::: "memory") 51#define rmb() asm volatile("" ::: "memory")
55#define cpu_relax() asm volatile("" ::: "memory"); 52#define cpu_relax() asm volatile("" ::: "memory");
56#define CPUINFO_PROC "cpu" 53#define CPUINFO_PROC "cpu"
57#endif 54#endif
58 55
59#ifdef __sparc__ 56#ifdef __sparc__
60#include "../../arch/sparc/include/uapi/asm/unistd.h"
61#define rmb() asm volatile("":::"memory") 57#define rmb() asm volatile("":::"memory")
62#define cpu_relax() asm volatile("":::"memory") 58#define cpu_relax() asm volatile("":::"memory")
63#define CPUINFO_PROC "cpu" 59#define CPUINFO_PROC "cpu"
64#endif 60#endif
65 61
66#ifdef __alpha__ 62#ifdef __alpha__
67#include "../../arch/alpha/include/asm/unistd.h"
68#define rmb() asm volatile("mb" ::: "memory") 63#define rmb() asm volatile("mb" ::: "memory")
69#define cpu_relax() asm volatile("" ::: "memory") 64#define cpu_relax() asm volatile("" ::: "memory")
70#define CPUINFO_PROC "cpu model" 65#define CPUINFO_PROC "cpu model"
71#endif 66#endif
72 67
73#ifdef __ia64__ 68#ifdef __ia64__
74#include "../../arch/ia64/include/asm/unistd.h"
75#define rmb() asm volatile ("mf" ::: "memory") 69#define rmb() asm volatile ("mf" ::: "memory")
76#define cpu_relax() asm volatile ("hint @pause" ::: "memory") 70#define cpu_relax() asm volatile ("hint @pause" ::: "memory")
77#define CPUINFO_PROC "model name" 71#define CPUINFO_PROC "model name"
78#endif 72#endif
79 73
80#ifdef __arm__ 74#ifdef __arm__
81#include "../../arch/arm/include/asm/unistd.h"
82/* 75/*
83 * Use the __kuser_memory_barrier helper in the CPU helper page. See 76 * Use the __kuser_memory_barrier helper in the CPU helper page. See
84 * arch/arm/kernel/entry-armv.S in the kernel source for details. 77 * arch/arm/kernel/entry-armv.S in the kernel source for details.
@@ -89,13 +82,11 @@ void get_term_dimensions(struct winsize *ws);
89#endif 82#endif
90 83
91#ifdef __aarch64__ 84#ifdef __aarch64__
92#include "../../arch/arm64/include/asm/unistd.h"
93#define rmb() asm volatile("dmb ld" ::: "memory") 85#define rmb() asm volatile("dmb ld" ::: "memory")
94#define cpu_relax() asm volatile("yield" ::: "memory") 86#define cpu_relax() asm volatile("yield" ::: "memory")
95#endif 87#endif
96 88
97#ifdef __mips__ 89#ifdef __mips__
98#include "../../arch/mips/include/asm/unistd.h"
99#define rmb() asm volatile( \ 90#define rmb() asm volatile( \
100 ".set mips2\n\t" \ 91 ".set mips2\n\t" \
101 "sync\n\t" \ 92 "sync\n\t" \
@@ -112,7 +103,7 @@ void get_term_dimensions(struct winsize *ws);
112#include <sys/types.h> 103#include <sys/types.h>
113#include <sys/syscall.h> 104#include <sys/syscall.h>
114 105
115#include "../../include/uapi/linux/perf_event.h" 106#include <linux/perf_event.h>
116#include "util/types.h" 107#include "util/types.h"
117#include <stdbool.h> 108#include <stdbool.h>
118 109