X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=usertrace%2Flttng_usertrace.h;h=600be4ffbb5915464e7874eab64b037cc7a6f95e;hb=89c39b83182acc6bf8ef02df05c4d1ff88aa5187;hp=b4aa8f3b6ed74a38a5c9110a6f2e1703ef24ac48;hpb=92f441a729c923fa6e27fad038918a42a1c76ef0;p=lttv.git diff --git a/usertrace/lttng_usertrace.h b/usertrace/lttng_usertrace.h index b4aa8f3b..600be4ff 100644 --- a/usertrace/lttng_usertrace.h +++ b/usertrace/lttng_usertrace.h @@ -11,6 +11,8 @@ #include #include +#include + //Put in asm-i486/unistd.h #define __NR_ltt_update 294 #define __NR_ltt_switch 295 @@ -24,9 +26,36 @@ #define SYS_ltt_switch __NR_ltt_switch #endif +struct ltt_buf { + void *start; + size_t length; + atomic_t offset; + atomic_t reserve_count; + atomic_t commit_count; + + atomic_t events_lost; +}; + +struct lttng_trace_info { + int active:1; + int destroy:1; + int filter; + atomic_t nesting; + struct { + struct ltt_buf facilities; + struct ltt_buf cpu; + } channel; +}; + + void __lttng_sig_trace_handler(int signo); +/* Call this at the beginning of a new thread, except for the main() */ +void lttng_thread_init(void); + +void lttng_free_trace_info(struct lttng_trace_info *info); + static inline _syscall1(int, ltt_switch, unsigned long, addr) -static inline _syscall3(int, ltt_update, unsigned long, addr, int *, active, int *, filter) +static inline _syscall5(int, ltt_update, unsigned long *, cpu_addr, unsigned long *, fac_addr, int *, active, int *, filter, int *, destroy) #endif //_LTTNG_USERTRACE_H