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.
16 #define LTTNG_UST_SYM_NAME_LEN 128
18 enum lttng_ust_instrumentation
{
19 LTTNG_UST_TRACEPOINT
= 0,
25 enum lttng_ust_output
{
30 * LTTng DebugFS ABI structures.
33 struct lttng_ust_channel
{
34 int overwrite
; /* 1: overwrite, 0: discard */
35 uint64_t subbuf_size
; /* in bytes */
37 unsigned int switch_timer_interval
; /* usecs */
38 unsigned int read_timer_interval
; /* usecs */
39 enum lttng_ust_output output
; /* mmap */
42 struct lttng_ust_event
{
43 char name
[LTTNG_UST_SYM_NAME_LEN
]; /* event name */
44 enum lttng_ust_instrumentation instrumentation
;
45 /* Per instrumentation type configuration */
50 struct lttng_ust_tracer_version
{
56 enum lttng_ust_context_type
{
57 LTTNG_UST_CONTEXT_VTID
= 0,
60 struct lttng_ust_context
{
61 enum lttng_ust_context_type ctx
;
66 #define _UST_CMD(minor) (minor)
67 #define _UST_CMDR(minor, type) (minor)
68 #define _UST_CMDW(minor, type) (minor)
70 /* LTTng-UST commands */
71 #define LTTNG_UST_SESSION _UST_CMD(0x40)
72 #define LTTNG_UST_TRACER_VERSION \
73 _UST_CMDR(0x41, struct lttng_ust_tracer_version)
74 #define LTTNG_UST_TRACEPOINT_LIST _UST_CMD(0x42)
75 #define LTTNG_UST_WAIT_QUIESCENT _UST_CMD(0x43)
77 /* Session FD ioctl */
78 #define LTTNG_UST_METADATA \
79 _UST_CMDW(0x50, struct lttng_ust_channel)
80 #define LTTNG_UST_CHANNEL \
81 _UST_CMDW(0x51, struct lttng_ust_channel)
82 #define LTTNG_UST_SESSION_START _UST_CMD(0x52)
83 #define LTTNG_UST_SESSION_STOP _UST_CMD(0x53)
85 /* Channel FD ioctl */
86 #define LTTNG_UST_STREAM _UST_CMD(0x60)
87 #define LTTNG_UST_EVENT \
88 _UST_CMDW(0x61, struct lttng_ust_event)
90 /* Event and Channel FD ioctl */
91 #define LTTNG_UST_CONTEXT \
92 _UST_CMDW(0x70, struct lttng_ust_context)
94 /* Event, Channel and Session ioctl */
95 #define LTTNG_UST_ENABLE _UST_CMD(0x80)
96 #define LTTNG_UST_DISABLE _UST_CMD(0x81)
98 #endif /* _LTTNG_UST_ABI_H */