2 * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 * Copyright (C) 2011 EfficiOS Inc.
5 * SPDX-License-Identifier: GPL-2.0-only
9 #ifndef _LTTNG_KERNEL_OLD_H
10 #define _LTTNG_KERNEL_OLD_H
12 #include <common/lttng-kernel.hpp>
17 * LTTng DebugFS ABI structures.
19 * This is the kernel ABI copied from lttng-modules tree.
22 /* Perf counter attributes */
23 struct lttng_kernel_abi_old_perf_counter_ctx {
26 char name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
29 /* Event/Channel context */
30 #define LTTNG_KERNEL_ABI_OLD_CONTEXT_PADDING1 16
31 #define LTTNG_KERNEL_ABI_OLD_CONTEXT_PADDING2 ((LTTNG_KERNEL_ABI_SYM_NAME_LEN + 32))
32 struct lttng_kernel_abi_old_context {
33 enum lttng_kernel_abi_context_type ctx;
34 char padding[LTTNG_KERNEL_ABI_OLD_CONTEXT_PADDING1];
37 struct lttng_kernel_abi_old_perf_counter_ctx perf_counter;
38 char padding[LTTNG_KERNEL_ABI_OLD_CONTEXT_PADDING2];
42 struct lttng_kernel_abi_old_kretprobe {
46 char symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
50 * Either addr is used, or symbol_name and offset.
52 struct lttng_kernel_abi_old_kprobe {
56 char symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
60 struct lttng_kernel_abi_old_function {
61 char symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
64 #define LTTNG_KERNEL_ABI_OLD_EVENT_PADDING1 16
65 #define LTTNG_KERNEL_ABI_OLD_EVENT_PADDING2 ((LTTNG_KERNEL_ABI_SYM_NAME_LEN + 32))
66 struct lttng_kernel_abi_old_event {
67 char name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
68 enum lttng_kernel_abi_instrumentation instrumentation;
69 char padding[LTTNG_KERNEL_ABI_OLD_EVENT_PADDING1];
71 /* Per instrumentation type configuration */
73 struct lttng_kernel_abi_old_kretprobe kretprobe;
74 struct lttng_kernel_abi_old_kprobe kprobe;
75 struct lttng_kernel_abi_old_function ftrace;
76 char padding[LTTNG_KERNEL_ABI_OLD_EVENT_PADDING2];
80 struct lttng_kernel_abi_old_tracer_version {
89 #define LTTNG_KERNEL_ABI_OLD_CHANNEL_PADDING1 ((LTTNG_SYMBOL_NAME_LEN + 32))
90 struct lttng_kernel_abi_old_channel {
91 int overwrite; /* 1: overwrite, 0: discard */
92 uint64_t subbuf_size; /* bytes */
93 uint64_t num_subbuf; /* power of 2 */
94 unsigned int switch_timer_interval; /* usec */
95 unsigned int read_timer_interval; /* usec */
96 enum lttng_event_output output; /* splice, mmap */
98 char padding[LTTNG_KERNEL_ABI_OLD_CHANNEL_PADDING1];
101 #endif /* _LTTNG_KERNEL_OLD_H */