summaryrefslogtreecommitdiff
path: root/include/asm-x86/ptrace-abi.h
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2008-01-30 13:31:09 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:31:09 +0100
commiteee3af4a2c83a97fff107ddc445d9df6fded9ce4 (patch)
treea7e9179b82b4df9e4cf6e810c54309324589395b /include/asm-x86/ptrace-abi.h
parent7796931f542518092d1fd2fb7cf1f1d96e0cd4b5 (diff)
x86, ptrace: support for branch trace store(BTS)
Resend using different mail client Changes to the last version: - split implementation into two layers: ds/bts and ptrace - renamed TIF's - save/restore ds save area msr in __switch_to_xtra() - make block-stepping only look at BTF bit Signed-off-by: Markus Metzger <markus.t.metzger@intel.com> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/ptrace-abi.h')
-rw-r--r--include/asm-x86/ptrace-abi.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/include/asm-x86/ptrace-abi.h b/include/asm-x86/ptrace-abi.h
index adce6b51df2e..6fadc5214e14 100644
--- a/include/asm-x86/ptrace-abi.h
+++ b/include/asm-x86/ptrace-abi.h
@@ -80,4 +80,56 @@
#define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */
+/* Return maximal BTS buffer size in number of records,
+ if successuf; -1, otherwise.
+ EOPNOTSUPP...processor does not support bts tracing */
+#define PTRACE_BTS_MAX_BUFFER_SIZE 40
+
+/* Allocate new bts buffer (free old one, if exists) of size DATA bts records;
+ parameter ADDR is ignored.
+ Return 0, if successful; -1, otherwise.
+ EOPNOTSUPP...processor does not support bts tracing
+ EINVAL.......invalid size in records
+ ENOMEM.......out of memory */
+#define PTRACE_BTS_ALLOCATE_BUFFER 41
+
+/* Return the size of the bts buffer in number of bts records,
+ if successful; -1, otherwise.
+ EOPNOTSUPP...processor does not support bts tracing
+ ENXIO........no buffer allocated */
+#define PTRACE_BTS_GET_BUFFER_SIZE 42
+
+/* Return the index of the next bts record to be written,
+ if successful; -1, otherwise.
+ EOPNOTSUPP...processor does not support bts tracing
+ ENXIO........no buffer allocated
+ After the first warp-around, this is the start of the circular bts buffer. */
+#define PTRACE_BTS_GET_INDEX 43
+
+/* Read the DATA'th bts record into a ptrace_bts_record buffer provided in ADDR.
+ Return 0, if successful; -1, otherwise
+ EOPNOTSUPP...processor does not support bts tracing
+ ENXIO........no buffer allocated
+ EINVAL.......invalid index */
+#define PTRACE_BTS_READ_RECORD 44
+
+/* Configure last branch trace; the configuration is given as a bit-mask of
+ PTRACE_BTS_O_* options in DATA; parameter ADDR is ignored.
+ Return 0, if successful; -1, otherwise
+ EOPNOTSUPP...processor does not support bts tracing
+ ENXIO........no buffer allocated */
+#define PTRACE_BTS_CONFIG 45
+
+/* Return the configuration as bit-mask of PTRACE_BTS_O_* options
+ if successful; -1, otherwise.
+ EOPNOTSUPP...processor does not support bts tracing
+ ENXIO........no buffer allocated */
+#define PTRACE_BTS_STATUS 46
+
+/* Trace configuration options */
+/* Collect last branch trace */
+#define PTRACE_BTS_O_TRACE_TASK 0x1
+/* Take timestamps when the task arrives and departs */
+#define PTRACE_BTS_O_TIMESTAMPS 0x2
+
#endif