instrumentation: update mm_vmscan for kernel >= 5.7.0
[lttng-modules.git] / lttng-abi-old.h
1 /* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
2 *
3 * lttng-abi-old.h
4 *
5 * LTTng old ABI header (without support for compat 32/64 bits)
6 *
7 * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 */
9
10 #ifndef _LTTNG_ABI_OLD_H
11 #define _LTTNG_ABI_OLD_H
12
13 #include <linux/fs.h>
14 #include <lttng-abi.h>
15
16 /*
17 * LTTng DebugFS ABI structures.
18 */
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 */
23 uint64_t num_subbuf;
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];
28 };
29
30 struct lttng_kernel_old_kretprobe {
31 uint64_t addr;
32
33 uint64_t offset;
34 char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
35 };
36
37 /*
38 * Either addr is used, or symbol_name and offset.
39 */
40 struct lttng_kernel_old_kprobe {
41 uint64_t addr;
42
43 uint64_t offset;
44 char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
45 };
46
47 struct lttng_kernel_old_function_tracer {
48 char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
49 };
50
51 /*
52 * For syscall tracing, name = '\0' means "enable all".
53 */
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];
60
61 /* Per instrumentation type configuration */
62 union {
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];
67 } u;
68 };
69
70 struct lttng_kernel_old_tracer_version {
71 uint32_t major;
72 uint32_t minor;
73 uint32_t patchlevel;
74 };
75
76 struct lttng_kernel_old_calibrate {
77 enum lttng_kernel_calibrate_type type; /* type (input) */
78 };
79
80 struct lttng_kernel_old_perf_counter_ctx {
81 uint32_t type;
82 uint64_t config;
83 char name[LTTNG_KERNEL_SYM_NAME_LEN];
84 };
85
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];
91
92 union {
93 struct lttng_kernel_old_perf_counter_ctx perf_counter;
94 char padding[LTTNG_KERNEL_OLD_CONTEXT_PADDING2];
95 } u;
96 };
97
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)
106
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)
114
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)
119
120 /* Event and Channel FD ioctl */
121 #define LTTNG_KERNEL_OLD_CONTEXT \
122 _IOW(0xF6, 0x70, struct lttng_kernel_old_context)
123
124 /* Event, Channel and Session ioctl */
125 #define LTTNG_KERNEL_OLD_ENABLE _IO(0xF6, 0x80)
126 #define LTTNG_KERNEL_OLD_DISABLE _IO(0xF6, 0x81)
127
128 #endif /* _LTTNG_ABI_OLD_H */
This page took 0.031835 seconds and 4 git commands to generate.