1 #ifndef _LTTNG_ABI_OLD_H
2 #define _LTTNG_ABI_OLD_H
7 * LTTng old ABI header (without support for compat 32/64 bits)
9 * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; only
14 * version 2.1 of the License.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27 #include <lttng-abi.h>
30 * LTTng DebugFS ABI structures.
32 #define LTTNG_KERNEL_OLD_CHANNEL_PADDING LTTNG_KERNEL_SYM_NAME_LEN + 32
33 struct lttng_kernel_old_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_kernel_output output
; /* splice, mmap */
40 char padding
[LTTNG_KERNEL_OLD_CHANNEL_PADDING
];
43 struct lttng_kernel_old_kretprobe
{
47 char symbol_name
[LTTNG_KERNEL_SYM_NAME_LEN
];
51 * Either addr is used, or symbol_name and offset.
53 struct lttng_kernel_old_kprobe
{
57 char symbol_name
[LTTNG_KERNEL_SYM_NAME_LEN
];
60 struct lttng_kernel_old_function_tracer
{
61 char symbol_name
[LTTNG_KERNEL_SYM_NAME_LEN
];
65 * For syscall tracing, name = '\0' means "enable all".
67 #define LTTNG_KERNEL_OLD_EVENT_PADDING1 16
68 #define LTTNG_KERNEL_OLD_EVENT_PADDING2 LTTNG_KERNEL_SYM_NAME_LEN + 32
69 struct lttng_kernel_old_event
{
70 char name
[LTTNG_KERNEL_SYM_NAME_LEN
]; /* event name */
71 enum lttng_kernel_instrumentation instrumentation
;
72 char padding
[LTTNG_KERNEL_OLD_EVENT_PADDING1
];
74 /* Per instrumentation type configuration */
76 struct lttng_kernel_old_kretprobe kretprobe
;
77 struct lttng_kernel_old_kprobe kprobe
;
78 struct lttng_kernel_old_function_tracer ftrace
;
79 char padding
[LTTNG_KERNEL_OLD_EVENT_PADDING2
];
83 struct lttng_kernel_old_tracer_version
{
89 struct lttng_kernel_old_calibrate
{
90 enum lttng_kernel_calibrate_type type
; /* type (input) */
93 struct lttng_kernel_old_perf_counter_ctx
{
96 char name
[LTTNG_KERNEL_SYM_NAME_LEN
];
99 #define LTTNG_KERNEL_OLD_CONTEXT_PADDING1 16
100 #define LTTNG_KERNEL_OLD_CONTEXT_PADDING2 LTTNG_KERNEL_SYM_NAME_LEN + 32
101 struct lttng_kernel_old_context
{
102 enum lttng_kernel_context_type ctx
;
103 char padding
[LTTNG_KERNEL_OLD_CONTEXT_PADDING1
];
106 struct lttng_kernel_old_perf_counter_ctx perf_counter
;
107 char padding
[LTTNG_KERNEL_OLD_CONTEXT_PADDING2
];
111 /* LTTng file descriptor ioctl */
112 #define LTTNG_KERNEL_OLD_SESSION _IO(0xF6, 0x40)
113 #define LTTNG_KERNEL_OLD_TRACER_VERSION \
114 _IOR(0xF6, 0x41, struct lttng_kernel_old_tracer_version)
115 #define LTTNG_KERNEL_OLD_TRACEPOINT_LIST _IO(0xF6, 0x42)
116 #define LTTNG_KERNEL_OLD_WAIT_QUIESCENT _IO(0xF6, 0x43)
117 #define LTTNG_KERNEL_OLD_CALIBRATE \
118 _IOWR(0xF6, 0x44, struct lttng_kernel_old_calibrate)
120 /* Session FD ioctl */
121 #define LTTNG_KERNEL_OLD_METADATA \
122 _IOW(0xF6, 0x50, struct lttng_kernel_old_channel)
123 #define LTTNG_KERNEL_OLD_CHANNEL \
124 _IOW(0xF6, 0x51, struct lttng_kernel_old_channel)
125 #define LTTNG_KERNEL_OLD_SESSION_START _IO(0xF6, 0x52)
126 #define LTTNG_KERNEL_OLD_SESSION_STOP _IO(0xF6, 0x53)
128 /* Channel FD ioctl */
129 #define LTTNG_KERNEL_OLD_STREAM _IO(0xF6, 0x60)
130 #define LTTNG_KERNEL_OLD_EVENT \
131 _IOW(0xF6, 0x61, struct lttng_kernel_old_event)
133 /* Event and Channel FD ioctl */
134 #define LTTNG_KERNEL_OLD_CONTEXT \
135 _IOW(0xF6, 0x70, struct lttng_kernel_old_context)
137 /* Event, Channel and Session ioctl */
138 #define LTTNG_KERNEL_OLD_ENABLE _IO(0xF6, 0x80)
139 #define LTTNG_KERNEL_OLD_DISABLE _IO(0xF6, 0x81)
141 #endif /* _LTTNG_ABI_OLD_H */