Fix: Stream allocation and insertion consistency
[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 /* Get a snapshot of the current ring buffer producer and consumer positions */
23 #define RING_BUFFER_SNAPSHOT _IO(0xF6, 0x00)
24 /* Get the consumer position (iteration start) */
25 #define RING_BUFFER_SNAPSHOT_GET_CONSUMED _IOR(0xF6, 0x01, unsigned long)
26 /* Get the producer position (iteration end) */
27 #define RING_BUFFER_SNAPSHOT_GET_PRODUCED _IOR(0xF6, 0x02, unsigned long)
28 /* Get exclusive read access to the specified sub-buffer position */
29 #define RING_BUFFER_GET_SUBBUF _IOW(0xF6, 0x03, unsigned long)
30 /* Release exclusive sub-buffer access */
31 #define RING_BUFFER_PUT_SUBBUF _IO(0xF6, 0x04)
32
33 /* Get exclusive read access to the next sub-buffer that can be read. */
34 #define RING_BUFFER_GET_NEXT_SUBBUF _IO(0xF6, 0x05)
35 /* Release exclusive sub-buffer access, move consumer forward. */
36 #define RING_BUFFER_PUT_NEXT_SUBBUF _IO(0xF6, 0x06)
37 /* returns the size of the current sub-buffer, without padding (for mmap). */
38 #define RING_BUFFER_GET_SUBBUF_SIZE _IOR(0xF6, 0x07, unsigned long)
39 /* returns the size of the current sub-buffer, with padding (for splice). */
40 #define RING_BUFFER_GET_PADDED_SUBBUF_SIZE _IOR(0xF6, 0x08, unsigned long)
41 /* returns the maximum size for sub-buffers. */
42 #define RING_BUFFER_GET_MAX_SUBBUF_SIZE _IOR(0xF6, 0x09, unsigned long)
43 /* returns the length to mmap. */
44 #define RING_BUFFER_GET_MMAP_LEN _IOR(0xF6, 0x0A, unsigned long)
45 /* returns the offset of the subbuffer belonging to the mmap reader. */
46 #define RING_BUFFER_GET_MMAP_READ_OFFSET _IOR(0xF6, 0x0B, unsigned long)
47 /* flush the current sub-buffer */
48 #define RING_BUFFER_FLUSH _IO(0xF6, 0x0C)
49 /* map stream to stream id for network streaming */
50 #define RING_BUFFER_SET_STREAM_ID _IOW(0xF6, 0x0D, unsigned long)
51
52
53 /* LTTng file descriptor ioctl */
54 #define LTTNG_KERNEL_SESSION _IO(0xF6, 0x40)
55 #define LTTNG_KERNEL_TRACER_VERSION \
56 _IOR(0xF6, 0x41, struct lttng_kernel_tracer_version)
57 #define LTTNG_KERNEL_TRACEPOINT_LIST _IO(0xF6, 0x42)
58 #define LTTNG_KERNEL_WAIT_QUIESCENT _IO(0xF6, 0x43)
59 #define LTTNG_KERNEL_CALIBRATE \
60 _IOWR(0xF6, 0x44, struct lttng_kernel_calibrate)
61
62 /* Session FD ioctl */
63 #define LTTNG_KERNEL_METADATA \
64 _IOW(0xF6, 0x50, struct lttng_channel_attr)
65 #define LTTNG_KERNEL_CHANNEL \
66 _IOW(0xF6, 0x51, struct lttng_channel_attr)
67 #define LTTNG_KERNEL_SESSION_START _IO(0xF6, 0x52)
68 #define LTTNG_KERNEL_SESSION_STOP _IO(0xF6, 0x53)
69
70 /* Channel FD ioctl */
71 #define LTTNG_KERNEL_STREAM _IO(0xF6, 0x60)
72 #define LTTNG_KERNEL_EVENT \
73 _IOW(0xF6, 0x61, struct lttng_kernel_event)
74 #define LTTNG_KERNEL_STREAM_ID_OFFSET \
75 _IOR(0xF6, 0x62, unsigned long)
76
77 /* Event and Channel FD ioctl */
78 #define LTTNG_KERNEL_CONTEXT \
79 _IOW(0xF6, 0x70, struct lttng_kernel_context)
80
81 /* Event, Channel and Session ioctl */
82 #define LTTNG_KERNEL_ENABLE _IO(0xF6, 0x80)
83 #define LTTNG_KERNEL_DISABLE _IO(0xF6, 0x81)
84
85 #endif /* _LTT_KERNEL_IOCTL_H */
This page took 0.031937 seconds and 5 git commands to generate.