add usertrace-fast
[lttv.git] / usertrace-fast / ltt-usertrace-fast.h
1
2 /* LTTng user-space "fast" tracing header
3 *
4 * Copyright 2006 Mathieu Desnoyers
5 *
6 */
7
8 #ifndef _LTT_USERTRACE_FAST_H
9 #define _LTT_USERTRACE_FAST_H
10
11 #include <errno.h>
12 #include <asm/atomic.h>
13
14 #ifndef LTT_BUF_SIZE_CPU
15 #define LTT_BUF_SIZE_CPU 1048576
16 #endif //LTT_BUF_SIZE_CPU
17
18 #ifndef LTT_BUF_SIZE_FACILITIES
19 #define LTT_BUF_SIZE_FACILITIES 4096
20 #endif //LTT_BUF_SIZE_FACILITIES
21
22 struct ltt_buf {
23 atomic_t offset;
24 atomic_t reserve_count;
25 atomic_t commit_count;
26
27 atomic_t events_lost;
28 };
29
30 struct lttng_trace_info {
31 struct _pthread_cleanup_buffer cleanup;
32 int init;
33 int filter;
34 atomic_t nesting;
35 struct {
36 struct ltt_buf facilities;
37 char facilities_buf[LTT_BUF_SIZE_FACILITIES] __attribute__ ((aligned (8)));
38 struct ltt_buf cpu;
39 char cpu_buf[LTT_BUF_SIZE_CPU] __attribute__ ((aligned (8)));
40 } channel;
41 };
42
43 extern __thread struct lttng_trace_info lttng_trace_info;
44
45 void ltt_thread_init(void);
46
47 #endif //_LTT_USERTRACE_FAST_H
This page took 0.03223 seconds and 4 git commands to generate.