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
13 #include <common/lttng-kernel.h>
16 * LTTng DebugFS ABI structures.
18 * This is the kernel ABI copied from lttng-modules tree.
21 /* Perf counter attributes */
22 struct lttng_kernel_abi_old_perf_counter_ctx
{
25 char name
[LTTNG_KERNEL_ABI_SYM_NAME_LEN
];
28 /* Event/Channel context */
29 #define LTTNG_KERNEL_ABI_OLD_CONTEXT_PADDING1 16
30 #define LTTNG_KERNEL_ABI_OLD_CONTEXT_PADDING2 LTTNG_KERNEL_ABI_SYM_NAME_LEN + 32
31 struct lttng_kernel_abi_old_context
{
32 enum lttng_kernel_abi_context_type ctx
;
33 char padding
[LTTNG_KERNEL_ABI_OLD_CONTEXT_PADDING1
];
36 struct lttng_kernel_abi_old_perf_counter_ctx perf_counter
;
37 char padding
[LTTNG_KERNEL_ABI_OLD_CONTEXT_PADDING2
];
41 struct lttng_kernel_abi_old_kretprobe
{
45 char symbol_name
[LTTNG_KERNEL_ABI_SYM_NAME_LEN
];
49 * Either addr is used, or symbol_name and offset.
51 struct lttng_kernel_abi_old_kprobe
{
55 char symbol_name
[LTTNG_KERNEL_ABI_SYM_NAME_LEN
];
59 struct lttng_kernel_abi_old_function
{
60 char symbol_name
[LTTNG_KERNEL_ABI_SYM_NAME_LEN
];
63 #define LTTNG_KERNEL_ABI_OLD_EVENT_PADDING1 16
64 #define LTTNG_KERNEL_ABI_OLD_EVENT_PADDING2 LTTNG_KERNEL_ABI_SYM_NAME_LEN + 32
65 struct lttng_kernel_abi_old_event
{
66 char name
[LTTNG_KERNEL_ABI_SYM_NAME_LEN
];
67 enum lttng_kernel_abi_instrumentation instrumentation
;
68 char padding
[LTTNG_KERNEL_ABI_OLD_EVENT_PADDING1
];
70 /* Per instrumentation type configuration */
72 struct lttng_kernel_abi_old_kretprobe kretprobe
;
73 struct lttng_kernel_abi_old_kprobe kprobe
;
74 struct lttng_kernel_abi_old_function ftrace
;
75 char padding
[LTTNG_KERNEL_ABI_OLD_EVENT_PADDING2
];
79 struct lttng_kernel_abi_old_tracer_version
{
88 #define LTTNG_KERNEL_ABI_OLD_CHANNEL_PADDING1 LTTNG_SYMBOL_NAME_LEN + 32
89 struct lttng_kernel_abi_old_channel
{
90 int overwrite
; /* 1: overwrite, 0: discard */
91 uint64_t subbuf_size
; /* bytes */
92 uint64_t num_subbuf
; /* power of 2 */
93 unsigned int switch_timer_interval
; /* usec */
94 unsigned int read_timer_interval
; /* usec */
95 enum lttng_event_output output
; /* splice, mmap */
97 char padding
[LTTNG_KERNEL_ABI_OLD_CHANNEL_PADDING1
];
100 #endif /* _LTTNG_KERNEL_OLD_H */