Commit | Line | Data |
---|---|---|
a90917c3 MD |
1 | #ifndef _LTTNG_TRACER_H |
2 | #define _LTTNG_TRACER_H | |
17baffe2 | 3 | |
1c8284eb | 4 | /* |
a90917c3 | 5 | * lttng-tracer.h |
17baffe2 MD |
6 | * |
7 | * Copyright (C) 2005-2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
1c8284eb MD |
8 | * |
9 | * This contains the definitions for the Linux Trace Toolkit tracer. | |
10 | * | |
11 | * Dual LGPL v2.1/GPL v2 license. | |
12 | */ | |
13 | ||
1c8284eb MD |
14 | #include <stdarg.h> |
15 | #include <linux/types.h> | |
16 | #include <linux/limits.h> | |
17 | #include <linux/list.h> | |
18 | #include <linux/cache.h> | |
1c8284eb MD |
19 | #include <linux/timex.h> |
20 | #include <linux/wait.h> | |
1c8284eb MD |
21 | #include <asm/atomic.h> |
22 | #include <asm/local.h> | |
23 | ||
f3bc08c5 | 24 | #include "wrapper/trace-clock.h" |
a90917c3 MD |
25 | #include "lttng-tracer-core.h" |
26 | #include "lttng-events.h" | |
1c8284eb | 27 | |
9d485768 | 28 | #define LTTNG_VERSION 1 |
80c16bcf | 29 | #define LTTNG_PATCHLEVEL 9 |
9d485768 | 30 | #define LTTNG_SUBLEVEL 9 |
80c16bcf | 31 | |
c099397a MD |
32 | #ifndef CHAR_BIT |
33 | #define CHAR_BIT 8 | |
34 | #endif | |
35 | ||
1c8284eb | 36 | /* Number of bytes to log with a read/write event */ |
a90917c3 MD |
37 | #define LTTNG_LOG_RW_SIZE 32L |
38 | #define LTTNG_MAX_SMALL_SIZE 0xFFFFU | |
1c8284eb | 39 | |
d793d5e1 | 40 | #ifdef RING_BUFFER_ALIGN |
a90917c3 | 41 | #define lttng_alignof(type) __alignof__(type) |
c099397a | 42 | #else |
a90917c3 | 43 | #define lttng_alignof(type) 1 |
d793d5e1 | 44 | #endif |
1c8284eb | 45 | |
1c8284eb | 46 | /* Tracer properties */ |
1c25284c | 47 | #define CTF_MAGIC_NUMBER 0xC1FC1FC1 |
881833e3 | 48 | #define TSDL_MAGIC_NUMBER 0x75D11D57 |
4173df96 MD |
49 | |
50 | /* CTF specification version followed */ | |
51 | #define CTF_SPEC_MAJOR 1 | |
52 | #define CTF_SPEC_MINOR 8 | |
53 | ||
54 | /* Tracer major/minor versions */ | |
d793d5e1 MD |
55 | #define CTF_VERSION_MAJOR 0 |
56 | #define CTF_VERSION_MINOR 1 | |
1c8284eb | 57 | |
c099397a MD |
58 | /* |
59 | * Number of milliseconds to retry before failing metadata writes on buffer full | |
60 | * condition. (10 seconds) | |
61 | */ | |
62 | #define LTTNG_METADATA_TIMEOUT_MSEC 10000 | |
63 | ||
a90917c3 MD |
64 | #define LTTNG_RFLAG_EXTENDED RING_BUFFER_RFLAG_END |
65 | #define LTTNG_RFLAG_END (LTTNG_RFLAG_EXTENDED << 1) | |
64c796d8 | 66 | |
a90917c3 | 67 | #endif /* _LTTNG_TRACER_H */ |