summaryrefslogtreecommitdiffstats
path: root/include/asm-x86/ptrace.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-10-06 16:17:23 +0200
committerIngo Molnar <mingo@elte.hu>2008-10-06 16:17:23 +0200
commit19268ed7449c561694d048a34601a30e2d1aaf79 (patch)
tree6f3f28ddac5d2b1cecd0f18ccf283f076839532a /include/asm-x86/ptrace.h
parentMerge branch 'x86/header-guards' into x86-v28-for-linus-phase1 (diff)
parentx86: ds.c ptrace.c integer as NULL pointer sparse fixes (diff)
downloadlinux-19268ed7449c561694d048a34601a30e2d1aaf79.tar.xz
linux-19268ed7449c561694d048a34601a30e2d1aaf79.zip
Merge branch 'x86/pebs' into x86-v28-for-linus-phase1
Conflicts: include/asm-x86/ds.h Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/ptrace.h')
-rw-r--r--include/asm-x86/ptrace.h38
1 files changed, 36 insertions, 2 deletions
diff --git a/include/asm-x86/ptrace.h b/include/asm-x86/ptrace.h
index d464f252edc3..45c75238cd08 100644
--- a/include/asm-x86/ptrace.h
+++ b/include/asm-x86/ptrace.h
@@ -127,14 +127,48 @@ struct pt_regs {
#endif /* __KERNEL__ */
#endif /* !__i386__ */
+
+#ifdef CONFIG_X86_PTRACE_BTS
+/* a branch trace record entry
+ *
+ * In order to unify the interface between various processor versions,
+ * we use the below data structure for all processors.
+ */
+enum bts_qualifier {
+ BTS_INVALID = 0,
+ BTS_BRANCH,
+ BTS_TASK_ARRIVES,
+ BTS_TASK_DEPARTS
+};
+
+struct bts_struct {
+ __u64 qualifier;
+ union {
+ /* BTS_BRANCH */
+ struct {
+ __u64 from_ip;
+ __u64 to_ip;
+ } lbr;
+ /* BTS_TASK_ARRIVES or
+ BTS_TASK_DEPARTS */
+ __u64 jiffies;
+ } variant;
+};
+#endif /* CONFIG_X86_PTRACE_BTS */
+
#ifdef __KERNEL__
-/* the DS BTS struct is used for ptrace as well */
-#include <asm/ds.h>
+#include <linux/init.h>
+struct cpuinfo_x86;
struct task_struct;
+#ifdef CONFIG_X86_PTRACE_BTS
+extern void __cpuinit ptrace_bts_init_intel(struct cpuinfo_x86 *);
extern void ptrace_bts_take_timestamp(struct task_struct *, enum bts_qualifier);
+#else
+#define ptrace_bts_init_intel(config) do {} while (0)
+#endif /* CONFIG_X86_PTRACE_BTS */
extern unsigned long profile_pc(struct pt_regs *regs);