Fix: pthread::mutex unlock must not throw
[lttng-tools.git] / src / common / lttng-kernel-old.hpp
CommitLineData
4dbc372b 1/*
ab5be9fa 2 * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
21cf9b6b 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>
c9e313bc 13#include <common/lttng-kernel.hpp>
4dbc372b
JD
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 */
b8e2fb80 22struct lttng_kernel_abi_old_perf_counter_ctx {
4dbc372b
JD
23 uint32_t type;
24 uint64_t config;
b8e2fb80 25 char name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
4dbc372b
JD
26};
27
28/* Event/Channel context */
b8e2fb80
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 {
b8e2fb80
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
b8e2fb80 41struct lttng_kernel_abi_old_kretprobe {
4dbc372b
JD
42 uint64_t addr;
43
44 uint64_t offset;
b8e2fb80 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 */
b8e2fb80 51struct lttng_kernel_abi_old_kprobe {
4dbc372b
JD
52 uint64_t addr;
53
54 uint64_t offset;
b8e2fb80 55 char symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
4dbc372b
JD
56};
57
58/* Function tracer */
b8e2fb80
FD
59struct lttng_kernel_abi_old_function {
60 char symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
4dbc372b
JD
61};
62
b8e2fb80
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 {
b8e2fb80
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
b8e2fb80 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 */
b8e2fb80
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
b8e2fb80 97 char padding[LTTNG_KERNEL_ABI_OLD_CHANNEL_PADDING1];
4dbc372b
JD
98};
99
100#endif /* _LTTNG_KERNEL_OLD_H */
This page took 0.070289 seconds and 4 git commands to generate.