| 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 |
| 6 | * modify it under the terms of the GNU General Public License |
| 7 | * as published by the Free Software Foundation; either version 2 |
| 8 | * of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 18 | */ |
| 19 | |
| 20 | #ifndef _LTT_KERNEL_IOCTL_H |
| 21 | #define _LTT_KERNEL_IOCTL_H |
| 22 | |
| 23 | /* Get a snapshot of the current ring buffer producer and consumer positions */ |
| 24 | #define RING_BUFFER_SNAPSHOT _IO(0xF6, 0x00) |
| 25 | /* Get the consumer position (iteration start) */ |
| 26 | #define RING_BUFFER_SNAPSHOT_GET_CONSUMED _IOR(0xF6, 0x01, unsigned long) |
| 27 | /* Get the producer position (iteration end) */ |
| 28 | #define RING_BUFFER_SNAPSHOT_GET_PRODUCED _IOR(0xF6, 0x02, unsigned long) |
| 29 | /* Get exclusive read access to the specified sub-buffer position */ |
| 30 | #define RING_BUFFER_GET_SUBBUF _IOW(0xF6, 0x03, unsigned long) |
| 31 | /* Release exclusive sub-buffer access */ |
| 32 | #define RING_BUFFER_PUT_SUBBUF _IO(0xF6, 0x04) |
| 33 | |
| 34 | /* Get exclusive read access to the next sub-buffer that can be read. */ |
| 35 | #define RING_BUFFER_GET_NEXT_SUBBUF _IO(0xF6, 0x05) |
| 36 | /* Release exclusive sub-buffer access, move consumer forward. */ |
| 37 | #define RING_BUFFER_PUT_NEXT_SUBBUF _IO(0xF6, 0x06) |
| 38 | /* returns the size of the current sub-buffer, without padding (for mmap). */ |
| 39 | #define RING_BUFFER_GET_SUBBUF_SIZE _IOR(0xF6, 0x07, unsigned long) |
| 40 | /* returns the size of the current sub-buffer, with padding (for splice). */ |
| 41 | #define RING_BUFFER_GET_PADDED_SUBBUF_SIZE _IOR(0xF6, 0x08, unsigned long) |
| 42 | /* returns the maximum size for sub-buffers. */ |
| 43 | #define RING_BUFFER_GET_MAX_SUBBUF_SIZE _IOR(0xF6, 0x09, unsigned long) |
| 44 | /* returns the length to mmap. */ |
| 45 | #define RING_BUFFER_GET_MMAP_LEN _IOR(0xF6, 0x0A, unsigned long) |
| 46 | /* returns the offset of the subbuffer belonging to the mmap reader. */ |
| 47 | #define RING_BUFFER_GET_MMAP_READ_OFFSET _IOR(0xF6, 0x0B, unsigned long) |
| 48 | /* flush the current sub-buffer */ |
| 49 | #define RING_BUFFER_FLUSH _IO(0xF6, 0x0C) |
| 50 | |
| 51 | /* LTTng file descriptor ioctl */ |
| 52 | #define LTTNG_KERNEL_SESSION _IO(0xF6, 0x40) |
| 53 | #define LTTNG_KERNEL_TRACER_VERSION \ |
| 54 | _IOR(0xF6, 0x41, struct lttng_kernel_tracer_version) |
| 55 | #define LTTNG_KERNEL_TRACEPOINT_LIST _IO(0xF6, 0x42) |
| 56 | #define LTTNG_KERNEL_WAIT_QUIESCENT _IO(0xF6, 0x43) |
| 57 | |
| 58 | /* Session FD ioctl */ |
| 59 | #define LTTNG_KERNEL_METADATA \ |
| 60 | _IOW(0xF6, 0x50, struct lttng_channel_attr) |
| 61 | #define LTTNG_KERNEL_CHANNEL \ |
| 62 | _IOW(0xF6, 0x51, struct lttng_channel_attr) |
| 63 | #define LTTNG_KERNEL_SESSION_START _IO(0xF6, 0x52) |
| 64 | #define LTTNG_KERNEL_SESSION_STOP _IO(0xF6, 0x53) |
| 65 | |
| 66 | /* Channel FD ioctl */ |
| 67 | #define LTTNG_KERNEL_STREAM _IO(0xF6, 0x60) |
| 68 | #define LTTNG_KERNEL_EVENT \ |
| 69 | _IOW(0xF6, 0x61, struct lttng_kernel_event) |
| 70 | |
| 71 | /* Event and Channel FD ioctl */ |
| 72 | #define LTTNG_KERNEL_CONTEXT \ |
| 73 | _IOW(0xF6, 0x70, struct lttng_kernel_context) |
| 74 | |
| 75 | /* Event, Channel and Session ioctl */ |
| 76 | #define LTTNG_KERNEL_ENABLE _IO(0xF6, 0x80) |
| 77 | #define LTTNG_KERNEL_DISABLE _IO(0xF6, 0x81) |
| 78 | |
| 79 | #endif /* _LTT_KERNEL_IOCTL_H */ |