diff options
Diffstat (limited to 'tools/perf/perf.h')
-rw-r--r-- | tools/perf/perf.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/tools/perf/perf.h b/tools/perf/perf.h index ceb68aa51f7f..63e67cc5487b 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h | |||
@@ -19,13 +19,29 @@ | |||
19 | #define cpu_relax() asm volatile("" ::: "memory"); | 19 | #define cpu_relax() asm volatile("" ::: "memory"); |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | #ifdef __sh__ | ||
23 | #include "../../arch/sh/include/asm/unistd.h" | ||
24 | #if defined(__SH4A__) || defined(__SH5__) | ||
25 | # define rmb() asm volatile("synco" ::: "memory") | ||
26 | #else | ||
27 | # define rmb() asm volatile("" ::: "memory") | ||
28 | #endif | ||
29 | #define cpu_relax() asm volatile("" ::: "memory") | ||
30 | #endif | ||
31 | |||
32 | #ifdef __hppa__ | ||
33 | #include "../../arch/parisc/include/asm/unistd.h" | ||
34 | #define rmb() asm volatile("" ::: "memory") | ||
35 | #define cpu_relax() asm volatile("" ::: "memory"); | ||
36 | #endif | ||
37 | |||
22 | #include <time.h> | 38 | #include <time.h> |
23 | #include <unistd.h> | 39 | #include <unistd.h> |
24 | #include <sys/types.h> | 40 | #include <sys/types.h> |
25 | #include <sys/syscall.h> | 41 | #include <sys/syscall.h> |
26 | 42 | ||
27 | #include "../../include/linux/perf_counter.h" | 43 | #include "../../include/linux/perf_counter.h" |
28 | #include "types.h" | 44 | #include "util/types.h" |
29 | 45 | ||
30 | /* | 46 | /* |
31 | * prctl(PR_TASK_PERF_COUNTERS_DISABLE) will (cheaply) disable all | 47 | * prctl(PR_TASK_PERF_COUNTERS_DISABLE) will (cheaply) disable all |
@@ -52,6 +68,8 @@ static inline unsigned long long rdclock(void) | |||
52 | #define __user | 68 | #define __user |
53 | #define asmlinkage | 69 | #define asmlinkage |
54 | 70 | ||
71 | #define __used __attribute__((__unused__)) | ||
72 | |||
55 | #define unlikely(x) __builtin_expect(!!(x), 0) | 73 | #define unlikely(x) __builtin_expect(!!(x), 0) |
56 | #define min(x, y) ({ \ | 74 | #define min(x, y) ({ \ |
57 | typeof(x) _min1 = (x); \ | 75 | typeof(x) _min1 = (x); \ |
@@ -72,10 +90,9 @@ sys_perf_counter_open(struct perf_counter_attr *attr, | |||
72 | #define MAX_COUNTERS 256 | 90 | #define MAX_COUNTERS 256 |
73 | #define MAX_NR_CPUS 256 | 91 | #define MAX_NR_CPUS 256 |
74 | 92 | ||
75 | struct perf_file_header { | 93 | struct ip_callchain { |
76 | u64 version; | 94 | u64 nr; |
77 | u64 sample_type; | 95 | u64 ips[0]; |
78 | u64 data_size; | ||
79 | }; | 96 | }; |
80 | 97 | ||
81 | #endif | 98 | #endif |