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