Fix: update btrfs instrumentation for kernel 4.11
[lttng-modules.git] / lttng-abi-old.h
CommitLineData
6dccd6c1
JD
1#ifndef _LTTNG_ABI_OLD_H
2#define _LTTNG_ABI_OLD_H
3
4/*
5 * lttng-abi-old.h
6 *
7 * LTTng old ABI header (without support for compat 32/64 bits)
8 *
9 * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 *
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.
15 *
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.
20 *
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
24 */
25
26#include <linux/fs.h>
bbd023d6 27#include <lttng-abi.h>
6dccd6c1
JD
28
29/*
30 * LTTng DebugFS ABI structures.
31 */
32#define LTTNG_KERNEL_OLD_CHANNEL_PADDING LTTNG_KERNEL_SYM_NAME_LEN + 32
33struct lttng_kernel_old_channel {
34 int overwrite; /* 1: overwrite, 0: discard */
35 uint64_t subbuf_size; /* in bytes */
36 uint64_t num_subbuf;
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];
41};
42
43struct lttng_kernel_old_kretprobe {
44 uint64_t addr;
45
46 uint64_t offset;
47 char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
48};
49
50/*
51 * Either addr is used, or symbol_name and offset.
52 */
53struct lttng_kernel_old_kprobe {
54 uint64_t addr;
55
56 uint64_t offset;
57 char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
58};
59
60struct lttng_kernel_old_function_tracer {
61 char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
62};
63
64/*
65 * For syscall tracing, name = '\0' means "enable all".
66 */
67#define LTTNG_KERNEL_OLD_EVENT_PADDING1 16
68#define LTTNG_KERNEL_OLD_EVENT_PADDING2 LTTNG_KERNEL_SYM_NAME_LEN + 32
69struct 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];
73
74 /* Per instrumentation type configuration */
75 union {
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];
80 } u;
81};
82
83struct lttng_kernel_old_tracer_version {
84 uint32_t major;
85 uint32_t minor;
86 uint32_t patchlevel;
87};
88
89struct lttng_kernel_old_calibrate {
90 enum lttng_kernel_calibrate_type type; /* type (input) */
91};
92
93struct lttng_kernel_old_perf_counter_ctx {
94 uint32_t type;
95 uint64_t config;
96 char name[LTTNG_KERNEL_SYM_NAME_LEN];
97};
98
99#define LTTNG_KERNEL_OLD_CONTEXT_PADDING1 16
100#define LTTNG_KERNEL_OLD_CONTEXT_PADDING2 LTTNG_KERNEL_SYM_NAME_LEN + 32
101struct lttng_kernel_old_context {
102 enum lttng_kernel_context_type ctx;
103 char padding[LTTNG_KERNEL_OLD_CONTEXT_PADDING1];
104
105 union {
106 struct lttng_kernel_old_perf_counter_ctx perf_counter;
107 char padding[LTTNG_KERNEL_OLD_CONTEXT_PADDING2];
108 } u;
109};
110
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)
119
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)
127
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)
132
133/* Event and Channel FD ioctl */
134#define LTTNG_KERNEL_OLD_CONTEXT \
135 _IOW(0xF6, 0x70, struct lttng_kernel_old_context)
136
137/* Event, Channel and Session ioctl */
138#define LTTNG_KERNEL_OLD_ENABLE _IO(0xF6, 0x80)
139#define LTTNG_KERNEL_OLD_DISABLE _IO(0xF6, 0x81)
140
141#endif /* _LTTNG_ABI_OLD_H */
This page took 0.034392 seconds and 4 git commands to generate.