a740a832b3a46079068ca73cdc4fafbe2160d8f5
[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 filter;
33 atomic_t nesting;
34 struct {
35 struct ltt_buf facilities;
36 char facilities_buf[LTT_BUF_SIZE_FACILITIES] __attribute__ ((aligned (8)));
37 struct ltt_buf cpu;
38 char cpu_buf[LTT_BUF_SIZE_CPU] __attribute__ ((aligned (8)));
39 } channel;
40 };
41
42 extern __thread struct lttng_trace_info lttng_trace_info;
43
44 void ltt_thread_init(void);
45
46 #endif //_LTT_USERTRACE_FAST_H
This page took 0.030074 seconds and 4 git commands to generate.