aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/ptrace-abi.h
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2008-01-30 07:31:09 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:31:09 -0500
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 @@
80 80
81#define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */ 81#define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */
82 82
83/* Return maximal BTS buffer size in number of records,
84 if successuf; -1, otherwise.
85 EOPNOTSUPP...processor does not support bts tracing */
86#define PTRACE_BTS_MAX_BUFFER_SIZE 40
87
88/* Allocate new bts buffer (free old one, if exists) of size DATA bts records;
89 parameter ADDR is ignored.
90 Return 0, if successful; -1, otherwise.
91 EOPNOTSUPP...processor does not support bts tracing
92 EINVAL.......invalid size in records
93 ENOMEM.......out of memory */
94#define PTRACE_BTS_ALLOCATE_BUFFER 41
95
96/* Return the size of the bts buffer in number of bts records,
97 if successful; -1, otherwise.
98 EOPNOTSUPP...processor does not support bts tracing
99 ENXIO........no buffer allocated */
100#define PTRACE_BTS_GET_BUFFER_SIZE 42
101
102/* Return the index of the next bts record to be written,
103 if successful; -1, otherwise.
104 EOPNOTSUPP...processor does not support bts tracing
105 ENXIO........no buffer allocated
106 After the first warp-around, this is the start of the circular bts buffer. */
107#define PTRACE_BTS_GET_INDEX 43
108
109/* Read the DATA'th bts record into a ptrace_bts_record buffer provided in ADDR.
110 Return 0, if successful; -1, otherwise
111 EOPNOTSUPP...processor does not support bts tracing
112 ENXIO........no buffer allocated
113 EINVAL.......invalid index */
114#define PTRACE_BTS_READ_RECORD 44
115
116/* Configure last branch trace; the configuration is given as a bit-mask of
117 PTRACE_BTS_O_* options in DATA; parameter ADDR is ignored.
118 Return 0, if successful; -1, otherwise
119 EOPNOTSUPP...processor does not support bts tracing
120 ENXIO........no buffer allocated */
121#define PTRACE_BTS_CONFIG 45
122
123/* Return the configuration as bit-mask of PTRACE_BTS_O_* options
124 if successful; -1, otherwise.
125 EOPNOTSUPP...processor does not support bts tracing
126 ENXIO........no buffer allocated */
127#define PTRACE_BTS_STATUS 46
128
129/* Trace configuration options */
130/* Collect last branch trace */
131#define PTRACE_BTS_O_TRACE_TASK 0x1
132/* Take timestamps when the task arrives and departs */
133#define PTRACE_BTS_O_TIMESTAMPS 0x2
134
83#endif 135#endif