1 /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
5 * LTTng old ABI header (without support for compat 32/64 bits)
7 * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 #ifndef _LTTNG_ABI_OLD_H
11 #define _LTTNG_ABI_OLD_H
14 #include <lttng/abi.h>
17 * LTTng DebugFS ABI structures.
19 #define LTTNG_KERNEL_OLD_CHANNEL_PADDING LTTNG_KERNEL_SYM_NAME_LEN + 32
20 struct lttng_kernel_old_channel
{
21 int overwrite
; /* 1: overwrite, 0: discard */
22 uint64_t subbuf_size
; /* in bytes */
24 unsigned int switch_timer_interval
; /* usecs */
25 unsigned int read_timer_interval
; /* usecs */
26 enum lttng_kernel_output output
; /* splice, mmap */
27 char padding
[LTTNG_KERNEL_OLD_CHANNEL_PADDING
];
30 struct lttng_kernel_old_kretprobe
{
34 char symbol_name
[LTTNG_KERNEL_SYM_NAME_LEN
];
38 * Either addr is used, or symbol_name and offset.
40 struct lttng_kernel_old_kprobe
{
44 char symbol_name
[LTTNG_KERNEL_SYM_NAME_LEN
];
47 struct lttng_kernel_old_function_tracer
{
48 char symbol_name
[LTTNG_KERNEL_SYM_NAME_LEN
];
52 * For syscall tracing, name = '\0' means "enable all".
54 #define LTTNG_KERNEL_OLD_EVENT_PADDING1 16
55 #define LTTNG_KERNEL_OLD_EVENT_PADDING2 LTTNG_KERNEL_SYM_NAME_LEN + 32
56 struct lttng_kernel_old_event
{
57 char name
[LTTNG_KERNEL_SYM_NAME_LEN
]; /* event name */
58 enum lttng_kernel_instrumentation instrumentation
;
59 char padding
[LTTNG_KERNEL_OLD_EVENT_PADDING1
];
61 /* Per instrumentation type configuration */
63 struct lttng_kernel_old_kretprobe kretprobe
;
64 struct lttng_kernel_old_kprobe kprobe
;
65 struct lttng_kernel_old_function_tracer ftrace
;
66 char padding
[LTTNG_KERNEL_OLD_EVENT_PADDING2
];
70 struct lttng_kernel_old_tracer_version
{
76 struct lttng_kernel_old_calibrate
{
77 enum lttng_kernel_calibrate_type type
; /* type (input) */
80 struct lttng_kernel_old_perf_counter_ctx
{
83 char name
[LTTNG_KERNEL_SYM_NAME_LEN
];
86 #define LTTNG_KERNEL_OLD_CONTEXT_PADDING1 16
87 #define LTTNG_KERNEL_OLD_CONTEXT_PADDING2 LTTNG_KERNEL_SYM_NAME_LEN + 32
88 struct lttng_kernel_old_context
{
89 enum lttng_kernel_context_type ctx
;
90 char padding
[LTTNG_KERNEL_OLD_CONTEXT_PADDING1
];
93 struct lttng_kernel_old_perf_counter_ctx perf_counter
;
94 char padding
[LTTNG_KERNEL_OLD_CONTEXT_PADDING2
];
98 /* LTTng file descriptor ioctl */
99 #define LTTNG_KERNEL_OLD_SESSION _IO(0xF6, 0x40)
100 #define LTTNG_KERNEL_OLD_TRACER_VERSION \
101 _IOR(0xF6, 0x41, struct lttng_kernel_old_tracer_version)
102 #define LTTNG_KERNEL_OLD_TRACEPOINT_LIST _IO(0xF6, 0x42)
103 #define LTTNG_KERNEL_OLD_WAIT_QUIESCENT _IO(0xF6, 0x43)
104 #define LTTNG_KERNEL_OLD_CALIBRATE \
105 _IOWR(0xF6, 0x44, struct lttng_kernel_old_calibrate)
107 /* Session FD ioctl */
108 #define LTTNG_KERNEL_OLD_METADATA \
109 _IOW(0xF6, 0x50, struct lttng_kernel_old_channel)
110 #define LTTNG_KERNEL_OLD_CHANNEL \
111 _IOW(0xF6, 0x51, struct lttng_kernel_old_channel)
112 #define LTTNG_KERNEL_OLD_SESSION_START _IO(0xF6, 0x52)
113 #define LTTNG_KERNEL_OLD_SESSION_STOP _IO(0xF6, 0x53)
115 /* Channel FD ioctl */
116 #define LTTNG_KERNEL_OLD_STREAM _IO(0xF6, 0x60)
117 #define LTTNG_KERNEL_OLD_EVENT \
118 _IOW(0xF6, 0x61, struct lttng_kernel_old_event)
120 /* Event and Channel FD ioctl */
121 #define LTTNG_KERNEL_OLD_CONTEXT \
122 _IOW(0xF6, 0x70, struct lttng_kernel_old_context)
124 /* Event, Channel and Session ioctl */
125 #define LTTNG_KERNEL_OLD_ENABLE _IO(0xF6, 0x80)
126 #define LTTNG_KERNEL_OLD_DISABLE _IO(0xF6, 0x81)
128 #endif /* _LTTNG_ABI_OLD_H */