2 * Copyright (C) 2011 - Julien Desfossez <julien.desfossez@polymtl.ca>
3 * Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 * David Goulet <david.goulet@polymtl.ca>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License, version 2 only,
8 * as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #ifndef _LTTNG_KERNEL_OLD_H
21 #define _LTTNG_KERNEL_OLD_H
24 #include <common/lttng-kernel.h>
27 * LTTng DebugFS ABI structures.
29 * This is the kernel ABI copied from lttng-modules tree.
32 /* Perf counter attributes */
33 struct lttng_kernel_old_perf_counter_ctx
{
36 char name
[LTTNG_KERNEL_SYM_NAME_LEN
];
39 /* Event/Channel context */
40 #define LTTNG_KERNEL_OLD_CONTEXT_PADDING1 16
41 #define LTTNG_KERNEL_OLD_CONTEXT_PADDING2 LTTNG_KERNEL_SYM_NAME_LEN + 32
42 struct lttng_kernel_old_context
{
43 enum lttng_kernel_context_type ctx
;
44 char padding
[LTTNG_KERNEL_OLD_CONTEXT_PADDING1
];
47 struct lttng_kernel_old_perf_counter_ctx perf_counter
;
48 char padding
[LTTNG_KERNEL_OLD_CONTEXT_PADDING2
];
52 struct lttng_kernel_old_kretprobe
{
56 char symbol_name
[LTTNG_KERNEL_SYM_NAME_LEN
];
60 * Either addr is used, or symbol_name and offset.
62 struct lttng_kernel_old_kprobe
{
66 char symbol_name
[LTTNG_KERNEL_SYM_NAME_LEN
];
70 struct lttng_kernel_old_function
{
71 char symbol_name
[LTTNG_KERNEL_SYM_NAME_LEN
];
74 #define LTTNG_KERNEL_OLD_EVENT_PADDING1 16
75 #define LTTNG_KERNEL_OLD_EVENT_PADDING2 LTTNG_KERNEL_SYM_NAME_LEN + 32
76 struct lttng_kernel_old_event
{
77 char name
[LTTNG_KERNEL_SYM_NAME_LEN
];
78 enum lttng_kernel_instrumentation instrumentation
;
79 char padding
[LTTNG_KERNEL_OLD_EVENT_PADDING1
];
81 /* Per instrumentation type configuration */
83 struct lttng_kernel_old_kretprobe kretprobe
;
84 struct lttng_kernel_old_kprobe kprobe
;
85 struct lttng_kernel_old_function ftrace
;
86 char padding
[LTTNG_KERNEL_OLD_EVENT_PADDING2
];
90 struct lttng_kernel_old_tracer_version
{
96 struct lttng_kernel_old_calibrate
{
97 enum lttng_kernel_calibrate_type type
; /* type (input) */
103 #define LTTNG_KERNEL_OLD_CHANNEL_PADDING1 LTTNG_SYMBOL_NAME_LEN + 32
104 struct lttng_kernel_old_channel
{
105 int overwrite
; /* 1: overwrite, 0: discard */
106 uint64_t subbuf_size
; /* bytes */
107 uint64_t num_subbuf
; /* power of 2 */
108 unsigned int switch_timer_interval
; /* usec */
109 unsigned int read_timer_interval
; /* usec */
110 enum lttng_event_output output
; /* splice, mmap */
112 char padding
[LTTNG_KERNEL_OLD_CHANNEL_PADDING1
];
115 #endif /* _LTTNG_KERNEL_OLD_H */