Fix: lttng: placing probe on symbol starting with `_`
[lttng-tools.git] / src / common / kernel-ctl / kernel-ioctl.h
1 /*
2 * Copyright (C) 2011 - Julien Desfossez <julien.desfossez@polymtl.ca>
3 * Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License, version 2 only,
7 * as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19 #ifndef _LTT_KERNEL_IOCTL_H
20 #define _LTT_KERNEL_IOCTL_H
21
22 #define LTTNG_MODULES_ABI_MAJOR_VERSION 2
23 #define LTTNG_MODULES_ABI_MINOR_VERSION 5
24
25 /* Get a snapshot of the current ring buffer producer and consumer positions */
26 #define RING_BUFFER_SNAPSHOT _IO(0xF6, 0x00)
27 /* Get the consumer position (iteration start) */
28 #define RING_BUFFER_SNAPSHOT_GET_CONSUMED _IOR(0xF6, 0x01, unsigned long)
29 /* Get the producer position (iteration end) */
30 #define RING_BUFFER_SNAPSHOT_GET_PRODUCED _IOR(0xF6, 0x02, unsigned long)
31 /* Get exclusive read access to the specified sub-buffer position */
32 #define RING_BUFFER_GET_SUBBUF _IOW(0xF6, 0x03, unsigned long)
33 /* Release exclusive sub-buffer access */
34 #define RING_BUFFER_PUT_SUBBUF _IO(0xF6, 0x04)
35
36 /* Get exclusive read access to the next sub-buffer that can be read. */
37 #define RING_BUFFER_GET_NEXT_SUBBUF _IO(0xF6, 0x05)
38 /* Release exclusive sub-buffer access, move consumer forward. */
39 #define RING_BUFFER_PUT_NEXT_SUBBUF _IO(0xF6, 0x06)
40 /* returns the size of the current sub-buffer, without padding (for mmap). */
41 #define RING_BUFFER_GET_SUBBUF_SIZE _IOR(0xF6, 0x07, unsigned long)
42 /* returns the size of the current sub-buffer, with padding (for splice). */
43 #define RING_BUFFER_GET_PADDED_SUBBUF_SIZE _IOR(0xF6, 0x08, unsigned long)
44 /* returns the maximum size for sub-buffers. */
45 #define RING_BUFFER_GET_MAX_SUBBUF_SIZE _IOR(0xF6, 0x09, unsigned long)
46 /* returns the length to mmap. */
47 #define RING_BUFFER_GET_MMAP_LEN _IOR(0xF6, 0x0A, unsigned long)
48 /* returns the offset of the subbuffer belonging to the mmap reader. */
49 #define RING_BUFFER_GET_MMAP_READ_OFFSET _IOR(0xF6, 0x0B, unsigned long)
50 /* Flush the current sub-buffer, if non-empty. */
51 #define RING_BUFFER_FLUSH _IO(0xF6, 0x0C)
52 /* Get the current version of the metadata cache (after a get_next). */
53 #define RING_BUFFER_GET_METADATA_VERSION _IOR(0xF6, 0x0D, uint64_t)
54 /*
55 * Get a snapshot of the current ring buffer producer and consumer positions,
56 * regardless of whether or not the two positions are contained within the same
57 * sub-buffer.
58 */
59 #define RING_BUFFER_SNAPSHOT_SAMPLE_POSITIONS _IO(0xF6, 0x0E)
60 /* Flush the current sub-buffer, even if empty. */
61 #define RING_BUFFER_FLUSH_EMPTY _IO(0xF6, 0x0F)
62 /*
63 * Reset the position of what has been consumed from the metadata cache to 0
64 * so it can be read again.
65 */
66 #define RING_BUFFER_METADATA_CACHE_DUMP _IO(0xF6, 0x10)
67 /* Clear ring buffer content */
68 #define RING_BUFFER_CLEAR _IO(0xF6, 0x11)
69
70 /* returns the timestamp begin of the current sub-buffer */
71 #define LTTNG_RING_BUFFER_GET_TIMESTAMP_BEGIN _IOR(0xF6, 0x20, uint64_t)
72 /* returns the timestamp end of the current sub-buffer */
73 #define LTTNG_RING_BUFFER_GET_TIMESTAMP_END _IOR(0xF6, 0x21, uint64_t)
74 /* returns the number of events discarded */
75 #define LTTNG_RING_BUFFER_GET_EVENTS_DISCARDED _IOR(0xF6, 0x22, uint64_t)
76 /* returns the packet payload size */
77 #define LTTNG_RING_BUFFER_GET_CONTENT_SIZE _IOR(0xF6, 0x23, uint64_t)
78 /* returns the actual packet size */
79 #define LTTNG_RING_BUFFER_GET_PACKET_SIZE _IOR(0xF6, 0x24, uint64_t)
80 /* returns the stream id */
81 #define LTTNG_RING_BUFFER_GET_STREAM_ID _IOR(0xF6, 0x25, uint64_t)
82 /* returns the current timestamp */
83 #define LTTNG_RING_BUFFER_GET_CURRENT_TIMESTAMP _IOR(0xF6, 0x26, uint64_t)
84 /* returns the packet sequence number */
85 #define LTTNG_RING_BUFFER_GET_SEQ_NUM _IOR(0xF6, 0x27, uint64_t)
86 /* returns the stream instance id */
87 #define LTTNG_RING_BUFFER_INSTANCE_ID _IOR(0xF6, 0x28, uint64_t)
88
89 /* Old ABI (without support for 32/64 bits compat) */
90 /* LTTng file descriptor ioctl */
91 #define LTTNG_KERNEL_OLD_SESSION _IO(0xF6, 0x40)
92 #define LTTNG_KERNEL_OLD_TRACER_VERSION \
93 _IOR(0xF6, 0x41, struct lttng_kernel_old_tracer_version)
94 #define LTTNG_KERNEL_OLD_TRACEPOINT_LIST _IO(0xF6, 0x42)
95 #define LTTNG_KERNEL_OLD_WAIT_QUIESCENT _IO(0xF6, 0x43)
96
97 /* Session FD ioctl */
98 #define LTTNG_KERNEL_OLD_METADATA \
99 _IOW(0xF6, 0x50, struct lttng_kernel_old_channel)
100 #define LTTNG_KERNEL_OLD_CHANNEL \
101 _IOW(0xF6, 0x51, struct lttng_kernel_old_channel)
102 #define LTTNG_KERNEL_OLD_SESSION_START _IO(0xF6, 0x52)
103 #define LTTNG_KERNEL_OLD_SESSION_STOP _IO(0xF6, 0x53)
104
105 /* Channel FD ioctl */
106 #define LTTNG_KERNEL_OLD_STREAM _IO(0xF6, 0x60)
107 #define LTTNG_KERNEL_OLD_EVENT \
108 _IOW(0xF6, 0x61, struct lttng_kernel_old_event)
109
110 /* Event and Channel FD ioctl */
111 #define LTTNG_KERNEL_OLD_CONTEXT \
112 _IOW(0xF6, 0x70, struct lttng_kernel_old_context)
113
114 /* Event, Channel and Session ioctl */
115 #define LTTNG_KERNEL_OLD_ENABLE _IO(0xF6, 0x80)
116 #define LTTNG_KERNEL_OLD_DISABLE _IO(0xF6, 0x81)
117
118
119 /* Current ABI (with suport for 32/64 bits compat) */
120 /* LTTng file descriptor ioctl */
121 #define LTTNG_KERNEL_SESSION _IO(0xF6, 0x45)
122 #define LTTNG_KERNEL_TRACER_VERSION \
123 _IOR(0xF6, 0x46, struct lttng_kernel_tracer_version)
124 #define LTTNG_KERNEL_TRACEPOINT_LIST _IO(0xF6, 0x47)
125 #define LTTNG_KERNEL_WAIT_QUIESCENT _IO(0xF6, 0x48)
126 #define LTTNG_KERNEL_SYSCALL_LIST _IO(0xF6, 0x4A)
127 #define LTTNG_KERNEL_TRACER_ABI_VERSION \
128 _IOR(0xF6, 0x4B, struct lttng_kernel_tracer_abi_version)
129
130 /* Session FD ioctl */
131 #define LTTNG_KERNEL_METADATA \
132 _IOW(0xF6, 0x54, struct lttng_kernel_channel)
133 #define LTTNG_KERNEL_CHANNEL \
134 _IOW(0xF6, 0x55, struct lttng_kernel_channel)
135 #define LTTNG_KERNEL_SESSION_START _IO(0xF6, 0x56)
136 #define LTTNG_KERNEL_SESSION_STOP _IO(0xF6, 0x57)
137 #define LTTNG_KERNEL_SESSION_TRACK_PID \
138 _IOR(0xF6, 0x58, int32_t)
139 #define LTTNG_KERNEL_SESSION_UNTRACK_PID \
140 _IOR(0xF6, 0x59, int32_t)
141 /*
142 * ioctl 0x58 and 0x59 are duplicated here. It works, since _IOR vs _IO
143 * are generating two different ioctl numbers, but this was not done on
144 * purpose. We should generally try to avoid those duplications.
145 */
146 #define LTTNG_KERNEL_SESSION_LIST_TRACKER_PIDS _IO(0xF6, 0x58)
147 #define LTTNG_KERNEL_SESSION_METADATA_REGEN _IO(0xF6, 0x59)
148 /* 0x5A and 0x5B are reserved for a future ABI-breaking cleanup. */
149 #define LTTNG_KERNEL_SESSION_STATEDUMP _IO(0xF6, 0x5C)
150 #define LTTNG_KERNEL_SESSION_SET_NAME \
151 _IOR(0xF6, 0x5D, struct lttng_kernel_session_name)
152 #define LTTNG_KERNEL_SESSION_SET_CREATION_TIME \
153 _IOR(0xF6, 0x5E, struct lttng_kernel_session_creation_time)
154
155 /* Channel FD ioctl */
156 #define LTTNG_KERNEL_STREAM _IO(0xF6, 0x62)
157 #define LTTNG_KERNEL_EVENT \
158 _IOW(0xF6, 0x63, struct lttng_kernel_event)
159 #define LTTNG_KERNEL_SYSCALL_MASK \
160 _IOWR(0xF6, 0x64, struct lttng_kernel_syscall_mask)
161
162 /* Event and Channel FD ioctl */
163 #define LTTNG_KERNEL_CONTEXT \
164 _IOW(0xF6, 0x71, struct lttng_kernel_context)
165
166 /* Event, Channel and Session ioctl */
167 #define LTTNG_KERNEL_ENABLE _IO(0xF6, 0x82)
168 #define LTTNG_KERNEL_DISABLE _IO(0xF6, 0x83)
169
170 /* Event FD ioctl */
171 #define LTTNG_KERNEL_FILTER _IO(0xF6, 0x90)
172 #define LTTNG_KERNEL_ADD_CALLSITE _IO(0xF6, 0x91)
173
174 /* Session FD ioctl (continued) */
175 #define LTTNG_KERNEL_SESSION_LIST_TRACKER_IDS \
176 _IOR(0xF6, 0xA0, struct lttng_kernel_tracker_args)
177 #define LTTNG_KERNEL_SESSION_TRACK_ID \
178 _IOR(0xF6, 0xA1, struct lttng_kernel_tracker_args)
179 #define LTTNG_KERNEL_SESSION_UNTRACK_ID \
180 _IOR(0xF6, 0xA2, struct lttng_kernel_tracker_args)
181
182 #endif /* _LTT_KERNEL_IOCTL_H */
This page took 0.03569 seconds and 4 git commands to generate.