Fix: consumerd: slow metadata push slows down application registration
[lttng-tools.git] / src / common / lttng-kernel-old.h
CommitLineData
4dbc372b 1/*
ab5be9fa 2 * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
90c106c6 3 * Copyright (C) 2011 EfficiOS Inc.
4dbc372b 4 *
ab5be9fa 5 * SPDX-License-Identifier: GPL-2.0-only
4dbc372b 6 *
4dbc372b
JD
7 */
8
9#ifndef _LTTNG_KERNEL_OLD_H
10#define _LTTNG_KERNEL_OLD_H
11
12#include <stdint.h>
13#include <common/lttng-kernel.h>
14
15/*
16 * LTTng DebugFS ABI structures.
17 *
18 * This is the kernel ABI copied from lttng-modules tree.
19 */
20
21/* Perf counter attributes */
2d6bae7e 22struct lttng_kernel_abi_old_perf_counter_ctx {
4dbc372b
JD
23 uint32_t type;
24 uint64_t config;
2d6bae7e 25 char name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
4dbc372b
JD
26};
27
28/* Event/Channel context */
2d6bae7e
FD
29#define LTTNG_KERNEL_ABI_OLD_CONTEXT_PADDING1 16
30#define LTTNG_KERNEL_ABI_OLD_CONTEXT_PADDING2 LTTNG_KERNEL_ABI_SYM_NAME_LEN + 32
31struct lttng_kernel_abi_old_context {
32 enum lttng_kernel_abi_context_type ctx;
33 char padding[LTTNG_KERNEL_ABI_OLD_CONTEXT_PADDING1];
4dbc372b
JD
34
35 union {
2d6bae7e
FD
36 struct lttng_kernel_abi_old_perf_counter_ctx perf_counter;
37 char padding[LTTNG_KERNEL_ABI_OLD_CONTEXT_PADDING2];
4dbc372b
JD
38 } u;
39};
40
2d6bae7e 41struct lttng_kernel_abi_old_kretprobe {
4dbc372b
JD
42 uint64_t addr;
43
44 uint64_t offset;
2d6bae7e 45 char symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
4dbc372b
JD
46};
47
48/*
49 * Either addr is used, or symbol_name and offset.
50 */
2d6bae7e 51struct lttng_kernel_abi_old_kprobe {
4dbc372b
JD
52 uint64_t addr;
53
54 uint64_t offset;
2d6bae7e 55 char symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
4dbc372b
JD
56};
57
58/* Function tracer */
2d6bae7e
FD
59struct lttng_kernel_abi_old_function {
60 char symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
4dbc372b
JD
61};
62
2d6bae7e
FD
63#define LTTNG_KERNEL_ABI_OLD_EVENT_PADDING1 16
64#define LTTNG_KERNEL_ABI_OLD_EVENT_PADDING2 LTTNG_KERNEL_ABI_SYM_NAME_LEN + 32
65struct 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];
4dbc372b
JD
69
70 /* Per instrumentation type configuration */
71 union {
2d6bae7e
FD
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];
4dbc372b
JD
76 } u;
77};
78
2d6bae7e 79struct lttng_kernel_abi_old_tracer_version {
4dbc372b
JD
80 uint32_t major;
81 uint32_t minor;
82 uint32_t patchlevel;
83};
84
4dbc372b
JD
85/*
86 * kernel channel
87 */
2d6bae7e
FD
88#define LTTNG_KERNEL_ABI_OLD_CHANNEL_PADDING1 LTTNG_SYMBOL_NAME_LEN + 32
89struct lttng_kernel_abi_old_channel {
4dbc372b
JD
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 */
96
2d6bae7e 97 char padding[LTTNG_KERNEL_ABI_OLD_CHANNEL_PADDING1];
4dbc372b
JD
98};
99
100#endif /* _LTTNG_KERNEL_OLD_H */
This page took 0.08858 seconds and 4 git commands to generate.