1 #ifndef _LTTNG_UST_ABI_H
2 #define _LTTNG_UST_ABI_H
7 * Copyright 2010-2011 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 * Dual LGPL v2.1/GPL v2 license.
14 #define LTTNG_UST_SYM_NAME_LEN 128
16 enum lttng_ust_instrumentation
{
17 LTTNG_UST_TRACEPOINT
= 0,
23 enum lttng_ust_output
{
28 * LTTng DebugFS ABI structures.
31 struct lttng_ust_channel
{
32 int overwrite
; /* 1: overwrite, 0: discard */
33 uint64_t subbuf_size
; /* in bytes */
35 unsigned int switch_timer_interval
; /* usecs */
36 unsigned int read_timer_interval
; /* usecs */
37 enum lttng_ust_output output
; /* mmap */
40 struct lttng_ust_event
{
41 char name
[LTTNG_UST_SYM_NAME_LEN
]; /* event name */
42 enum lttng_ust_instrumentation instrumentation
;
43 /* Per instrumentation type configuration */
48 struct lttng_ust_tracer_version
{
54 enum lttng_ust_context_type
{
55 LTTNG_UST_CONTEXT_VTID
= 0,
58 struct lttng_ust_context
{
59 enum lttng_ust_context_type ctx
;
64 #define _UST_CMD(minor) (minor)
65 #define _UST_CMDR(minor, type) (minor)
66 #define _UST_CMDW(minor, type) (minor)
68 /* LTTng-UST commands */
69 #define LTTNG_UST_SESSION _UST_CMD(0x40)
70 #define LTTNG_UST_TRACER_VERSION \
71 _UST_CMDR(0x41, struct lttng_ust_tracer_version)
72 #define LTTNG_UST_TRACEPOINT_LIST _UST_CMD(0x42)
73 #define LTTNG_UST_WAIT_QUIESCENT _UST_CMD(0x43)
75 /* Session FD ioctl */
76 #define LTTNG_UST_METADATA \
77 _UST_CMDW(0x50, struct lttng_ust_channel)
78 #define LTTNG_UST_CHANNEL \
79 _UST_CMDW(0x51, struct lttng_ust_channel)
80 #define LTTNG_UST_SESSION_START _UST_CMD(0x52)
81 #define LTTNG_UST_SESSION_STOP _UST_CMD(0x53)
83 /* Channel FD ioctl */
84 #define LTTNG_UST_STREAM _UST_CMD(0x60)
85 #define LTTNG_UST_EVENT \
86 _UST_CMDW(0x61, struct lttng_ust_event)
88 /* Event and Channel FD ioctl */
89 #define LTTNG_UST_CONTEXT \
90 _UST_CMDW(0x70, struct lttng_ust_context)
92 /* Event, Channel and Session ioctl */
93 #define LTTNG_UST_ENABLE _UST_CMD(0x80)
94 #define LTTNG_UST_DISABLE _UST_CMD(0x81)
96 #endif /* _LTTNG_UST_ABI_H */