diff options
Diffstat (limited to 'tools/perf/perf.h')
-rw-r--r-- | tools/perf/perf.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/tools/perf/perf.h b/tools/perf/perf.h index bccb529dac08..8f729aedc1a3 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h | |||
@@ -13,13 +13,29 @@ | |||
13 | #define cpu_relax() asm volatile ("" ::: "memory"); | 13 | #define cpu_relax() asm volatile ("" ::: "memory"); |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | #ifdef __s390__ | ||
17 | #include "../../arch/s390/include/asm/unistd.h" | ||
18 | #define rmb() asm volatile("bcr 15,0" ::: "memory") | ||
19 | #define cpu_relax() asm volatile("" ::: "memory"); | ||
20 | #endif | ||
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 | |||
16 | #include <time.h> | 32 | #include <time.h> |
17 | #include <unistd.h> | 33 | #include <unistd.h> |
18 | #include <sys/types.h> | 34 | #include <sys/types.h> |
19 | #include <sys/syscall.h> | 35 | #include <sys/syscall.h> |
20 | 36 | ||
21 | #include "../../include/linux/perf_counter.h" | 37 | #include "../../include/linux/perf_counter.h" |
22 | #include "types.h" | 38 | #include "util/types.h" |
23 | 39 | ||
24 | /* | 40 | /* |
25 | * prctl(PR_TASK_PERF_COUNTERS_DISABLE) will (cheaply) disable all | 41 | * prctl(PR_TASK_PERF_COUNTERS_DISABLE) will (cheaply) disable all |
@@ -66,10 +82,9 @@ sys_perf_counter_open(struct perf_counter_attr *attr, | |||
66 | #define MAX_COUNTERS 256 | 82 | #define MAX_COUNTERS 256 |
67 | #define MAX_NR_CPUS 256 | 83 | #define MAX_NR_CPUS 256 |
68 | 84 | ||
69 | struct perf_file_header { | 85 | struct ip_callchain { |
70 | u64 version; | 86 | u64 nr; |
71 | u64 sample_type; | 87 | u64 ips[0]; |
72 | u64 data_size; | ||
73 | }; | 88 | }; |
74 | 89 | ||
75 | #endif | 90 | #endif |