diff options
Diffstat (limited to 'include/asm-x86/ptrace.h')
-rw-r--r-- | include/asm-x86/ptrace.h | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/include/asm-x86/ptrace.h b/include/asm-x86/ptrace.h index 66ff7bd47379..33a034be8b5c 100644 --- a/include/asm-x86/ptrace.h +++ b/include/asm-x86/ptrace.h | |||
@@ -127,14 +127,48 @@ struct pt_regs { | |||
127 | #endif /* __KERNEL__ */ | 127 | #endif /* __KERNEL__ */ |
128 | #endif /* !__i386__ */ | 128 | #endif /* !__i386__ */ |
129 | 129 | ||
130 | |||
131 | #ifdef CONFIG_X86_PTRACE_BTS | ||
132 | /* a branch trace record entry | ||
133 | * | ||
134 | * In order to unify the interface between various processor versions, | ||
135 | * we use the below data structure for all processors. | ||
136 | */ | ||
137 | enum bts_qualifier { | ||
138 | BTS_INVALID = 0, | ||
139 | BTS_BRANCH, | ||
140 | BTS_TASK_ARRIVES, | ||
141 | BTS_TASK_DEPARTS | ||
142 | }; | ||
143 | |||
144 | struct bts_struct { | ||
145 | __u64 qualifier; | ||
146 | union { | ||
147 | /* BTS_BRANCH */ | ||
148 | struct { | ||
149 | __u64 from_ip; | ||
150 | __u64 to_ip; | ||
151 | } lbr; | ||
152 | /* BTS_TASK_ARRIVES or | ||
153 | BTS_TASK_DEPARTS */ | ||
154 | __u64 jiffies; | ||
155 | } variant; | ||
156 | }; | ||
157 | #endif /* CONFIG_X86_PTRACE_BTS */ | ||
158 | |||
130 | #ifdef __KERNEL__ | 159 | #ifdef __KERNEL__ |
131 | 160 | ||
132 | /* the DS BTS struct is used for ptrace as well */ | 161 | #include <linux/init.h> |
133 | #include <asm/ds.h> | ||
134 | 162 | ||
163 | struct cpuinfo_x86; | ||
135 | struct task_struct; | 164 | struct task_struct; |
136 | 165 | ||
166 | #ifdef CONFIG_X86_PTRACE_BTS | ||
167 | extern void __cpuinit ptrace_bts_init_intel(struct cpuinfo_x86 *); | ||
137 | extern void ptrace_bts_take_timestamp(struct task_struct *, enum bts_qualifier); | 168 | extern void ptrace_bts_take_timestamp(struct task_struct *, enum bts_qualifier); |
169 | #else | ||
170 | #define ptrace_bts_init_intel(config) do {} while (0) | ||
171 | #endif /* CONFIG_X86_PTRACE_BTS */ | ||
138 | 172 | ||
139 | extern unsigned long profile_pc(struct pt_regs *regs); | 173 | extern unsigned long profile_pc(struct pt_regs *regs); |
140 | 174 | ||