5 * Taken from the lttng-ust-abi.h in the UST 2.0 git tree
7 * Copyright 2010-2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 * Copyright 2011 - David Goulet <david.goulet@polymtl.ca>
10 * LTTng-UST ABI header
12 * Dual LGPL v2.1/GPL v2 license.
17 #define LTTNG_UST_SYM_NAME_LEN 128
19 #define LTTNG_UST_COMM_VERSION_MAJOR 0
20 #define LTTNG_UST_COMM_VERSION_MINOR 1
22 /* See lttng-ust.h enum lttng_ust_output */
23 #define DEFAULT_UST_CHANNEL_OUTPUT LTTNG_UST_MMAP
25 enum lttng_ust_instrumentation
{
26 LTTNG_UST_TRACEPOINT
= 0,
28 LTTNG_UST_FUNCTION
= 2,
31 enum lttng_ust_output
{
35 struct lttng_ust_tracer_version
{
41 struct lttng_ust_channel
{
42 int overwrite
; /* 1: overwrite, 0: discard */
43 uint64_t subbuf_size
; /* in bytes */
45 unsigned int switch_timer_interval
; /* usecs */
46 unsigned int read_timer_interval
; /* usecs */
47 enum lttng_ust_output output
; /* output mode */
50 struct lttng_ust_event
{
51 char name
[LTTNG_UST_SYM_NAME_LEN
]; /* event name */
52 enum lttng_ust_instrumentation instrumentation
;
53 /* Per instrumentation type configuration */
58 enum lttng_ust_context_type
{
59 LTTNG_UST_CONTEXT_VTID
= 0,
62 struct lttng_ust_context
{
63 enum lttng_ust_context_type ctx
;
68 #define _UST_CMD(minor) (minor)
69 #define _UST_CMDR(minor, type) (minor)
70 #define _UST_CMDW(minor, type) (minor)
72 /* Handled by object descriptor */
73 #define LTTNG_UST_RELEASE _UST_CMD(0x1)
75 /* Handled by object cmd */
77 /* LTTng-UST commands */
78 #define LTTNG_UST_SESSION _UST_CMD(0x40)
79 #define LTTNG_UST_TRACER_VERSION \
80 _UST_CMDR(0x41, struct lttng_ust_tracer_version)
81 #define LTTNG_UST_TRACEPOINT_LIST _UST_CMD(0x42)
82 #define LTTNG_UST_WAIT_QUIESCENT _UST_CMD(0x43)
83 #define LTTNG_UST_REGISTER_DONE _UST_CMD(0x44)
85 /* Session FD ioctl */
86 #define LTTNG_UST_METADATA \
87 _UST_CMDW(0x50, struct lttng_ust_channel)
88 #define LTTNG_UST_CHANNEL \
89 _UST_CMDW(0x51, struct lttng_ust_channel)
90 #define LTTNG_UST_SESSION_START _UST_CMD(0x52)
91 #define LTTNG_UST_SESSION_STOP _UST_CMD(0x53)
93 /* Channel FD ioctl */
94 #define LTTNG_UST_STREAM _UST_CMD(0x60)
95 #define LTTNG_UST_EVENT \
96 _UST_CMDW(0x61, struct lttng_ust_event)
98 /* Event and Channel FD ioctl */
99 #define LTTNG_UST_CONTEXT \
100 _UST_CMDW(0x70, struct lttng_ust_context)
102 /* Event, Channel and Session ioctl */
103 #define LTTNG_UST_ENABLE _UST_CMD(0x80)
104 #define LTTNG_UST_DISABLE _UST_CMD(0x81)
106 #define LTTNG_UST_ROOT_HANDLE 0
108 #endif /* _LTTNG_UST_H */