X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-x86%2Fptrace-abi.h;h=f224eb3c3157591ac69a53466609ea0841beefbc;hb=849567b9363dc8b90c369fff8acc245a1b47d94d;hp=6fadc5214e1430e6ce7fe3d14c256a440f989d57;hpb=eee3af4a2c83a97fff107ddc445d9df6fded9ce4;p=pandora-kernel.git diff --git a/include/asm-x86/ptrace-abi.h b/include/asm-x86/ptrace-abi.h index 6fadc5214e14..f224eb3c3157 100644 --- a/include/asm-x86/ptrace-abi.h +++ b/include/asm-x86/ptrace-abi.h @@ -80,56 +80,64 @@ #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 +#ifndef __ASSEMBLY__ + +#include + +/* configuration/status structure used in PTRACE_BTS_CONFIG and + PTRACE_BTS_STATUS commands. +*/ +struct ptrace_bts_config { + /* requested or actual size of BTS buffer in bytes */ + __u32 size; + /* bitmask of below flags */ + __u32 flags; + /* buffer overflow signal */ + __u32 signal; + /* actual size of bts_struct in bytes */ + __u32 bts_size; +}; +#endif + +#define PTRACE_BTS_O_TRACE 0x1 /* branch trace */ +#define PTRACE_BTS_O_SCHED 0x2 /* scheduling events w/ jiffies */ +#define PTRACE_BTS_O_SIGNAL 0x4 /* send SIG on buffer overflow + instead of wrapping around */ +#define PTRACE_BTS_O_CUT_SIZE 0x8 /* cut requested size to max available + instead of failing */ + +#define PTRACE_BTS_CONFIG 40 +/* Configure branch trace recording. + ADDR points to a struct ptrace_bts_config. + DATA gives the size of that buffer. + A new buffer is allocated, iff the size changes. + Returns the number of bytes read. +*/ +#define PTRACE_BTS_STATUS 41 +/* Return the current configuration in a struct ptrace_bts_config + pointed to by ADDR; DATA gives the size of that buffer. + Returns the number of bytes written. +*/ +#define PTRACE_BTS_SIZE 42 +/* Return the number of available BTS records. + DATA and ADDR are ignored. +*/ +#define PTRACE_BTS_GET 43 +/* Get a single BTS record. + DATA defines the index into the BTS array, where 0 is the newest + entry, and higher indices refer to older entries. + ADDR is pointing to struct bts_struct (see asm/ds.h). +*/ +#define PTRACE_BTS_CLEAR 44 +/* Clear the BTS buffer. + DATA and ADDR are ignored. +*/ +#define PTRACE_BTS_DRAIN 45 +/* Read all available BTS records and clear the buffer. + ADDR points to an array of struct bts_struct. + DATA gives the size of that buffer. + BTS records are read from oldest to newest. + Returns number of BTS records drained. +*/ #endif