Commit | Line | Data |
---|---|---|
4dbc372b | 1 | /* |
ab5be9fa MJ |
2 | * Copyright (C) 2011 Julien Desfossez <julien.desfossez@polymtl.ca> |
3 | * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
4 | * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca> | |
4dbc372b | 5 | * |
ab5be9fa | 6 | * SPDX-License-Identifier: GPL-2.0-only |
4dbc372b | 7 | * |
4dbc372b JD |
8 | */ |
9 | ||
10 | #ifndef _LTTNG_KERNEL_OLD_H | |
11 | #define _LTTNG_KERNEL_OLD_H | |
12 | ||
13 | #include <stdint.h> | |
14 | #include <common/lttng-kernel.h> | |
15 | ||
16 | /* | |
17 | * LTTng DebugFS ABI structures. | |
18 | * | |
19 | * This is the kernel ABI copied from lttng-modules tree. | |
20 | */ | |
21 | ||
22 | /* Perf counter attributes */ | |
2d6bae7e | 23 | struct lttng_kernel_abi_old_perf_counter_ctx { |
4dbc372b JD |
24 | uint32_t type; |
25 | uint64_t config; | |
2d6bae7e | 26 | char name[LTTNG_KERNEL_ABI_SYM_NAME_LEN]; |
4dbc372b JD |
27 | }; |
28 | ||
29 | /* Event/Channel context */ | |
2d6bae7e FD |
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]; | |
4dbc372b JD |
35 | |
36 | union { | |
2d6bae7e FD |
37 | struct lttng_kernel_abi_old_perf_counter_ctx perf_counter; |
38 | char padding[LTTNG_KERNEL_ABI_OLD_CONTEXT_PADDING2]; | |
4dbc372b JD |
39 | } u; |
40 | }; | |
41 | ||
2d6bae7e | 42 | struct lttng_kernel_abi_old_kretprobe { |
4dbc372b JD |
43 | uint64_t addr; |
44 | ||
45 | uint64_t offset; | |
2d6bae7e | 46 | char symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN]; |
4dbc372b JD |
47 | }; |
48 | ||
49 | /* | |
50 | * Either addr is used, or symbol_name and offset. | |
51 | */ | |
2d6bae7e | 52 | struct lttng_kernel_abi_old_kprobe { |
4dbc372b JD |
53 | uint64_t addr; |
54 | ||
55 | uint64_t offset; | |
2d6bae7e | 56 | char symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN]; |
4dbc372b JD |
57 | }; |
58 | ||
59 | /* Function tracer */ | |
2d6bae7e FD |
60 | struct lttng_kernel_abi_old_function { |
61 | char symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN]; | |
4dbc372b JD |
62 | }; |
63 | ||
2d6bae7e FD |
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]; | |
4dbc372b JD |
70 | |
71 | /* Per instrumentation type configuration */ | |
72 | union { | |
2d6bae7e FD |
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]; | |
4dbc372b JD |
77 | } u; |
78 | }; | |
79 | ||
2d6bae7e | 80 | struct lttng_kernel_abi_old_tracer_version { |
4dbc372b JD |
81 | uint32_t major; |
82 | uint32_t minor; | |
83 | uint32_t patchlevel; | |
84 | }; | |
85 | ||
4dbc372b JD |
86 | /* |
87 | * kernel channel | |
88 | */ | |
2d6bae7e FD |
89 | #define LTTNG_KERNEL_ABI_OLD_CHANNEL_PADDING1 LTTNG_SYMBOL_NAME_LEN + 32 |
90 | struct lttng_kernel_abi_old_channel { | |
4dbc372b JD |
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 */ | |
97 | ||
2d6bae7e | 98 | char padding[LTTNG_KERNEL_ABI_OLD_CHANNEL_PADDING1]; |
4dbc372b JD |
99 | }; |
100 | ||
101 | #endif /* _LTTNG_KERNEL_OLD_H */ |