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