Commit | Line | Data |
---|---|---|
93128a92 DG |
1 | /* |
2 | * Copyright (C) 2011 - Julien Desfossez <julien.desfossez@polymtl.ca> | |
3 | * Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
4 | * David Goulet <david.goulet@polymtl.ca> | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or | |
7 | * modify it under the terms of the GNU General Public License | |
8 | * as published by the Free Software Foundation; either version 2 | |
9 | * of the License, or (at your option) any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | * GNU General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program; if not, write to the Free Software | |
18 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
19 | */ | |
20 | ||
21 | #ifndef _LTTNG_KERNEL_H | |
22 | #define _LTTNG_KERNEL_H | |
23 | ||
9bda164d | 24 | #include "lttng-share.h" |
93128a92 | 25 | |
9cb98350 JD |
26 | #define LTTNG_SYM_NAME_LEN 128 |
27 | ||
28 | enum lttng_kernel_instrumentation { | |
e6ddca71 DG |
29 | LTTNG_KERNEL_TRACEPOINT = 0, |
30 | LTTNG_KERNEL_KPROBE = 1, | |
31 | LTTNG_KERNEL_FUNCTION = 2, | |
32 | }; | |
33 | ||
34 | /* | |
35 | * LTTng consumer mode | |
36 | */ | |
37 | enum lttng_kernel_output { | |
38 | LTTNG_KERNEL_SPLICE = 0, | |
39 | LTTNG_KERNEL_MMAP = 1, | |
9cb98350 JD |
40 | }; |
41 | ||
93128a92 DG |
42 | /* |
43 | * LTTng DebugFS ABI structures. | |
f3ed775e DG |
44 | * |
45 | * This is the kernel ABI copied from lttng-modules tree. | |
93128a92 | 46 | */ |
9cb98350 | 47 | |
f3ed775e | 48 | /* Either addr is used or symbol_name and offset. */ |
9cb98350 JD |
49 | struct lttng_kernel_kprobe { |
50 | uint64_t addr; | |
51 | ||
52 | uint64_t offset; | |
53 | char symbol_name[LTTNG_SYM_NAME_LEN]; | |
54 | }; | |
55 | ||
56 | struct lttng_kernel_function_tracer { | |
57 | char symbol_name[LTTNG_SYM_NAME_LEN]; | |
93128a92 DG |
58 | }; |
59 | ||
9cb98350 | 60 | struct lttng_kernel_event { |
f3ed775e | 61 | char name[LTTNG_SYM_NAME_LEN]; |
9cb98350 JD |
62 | enum lttng_kernel_instrumentation instrumentation; |
63 | /* Per instrumentation type configuration */ | |
64 | union { | |
9cb98350 JD |
65 | struct lttng_kernel_kprobe kprobe; |
66 | struct lttng_kernel_function_tracer ftrace; | |
67 | } u; | |
93128a92 DG |
68 | }; |
69 | ||
9cb98350 JD |
70 | struct lttng_kernel_tracer_version { |
71 | uint32_t version; | |
72 | uint32_t patchlevel; | |
73 | uint32_t sublevel; | |
93128a92 DG |
74 | }; |
75 | ||
76 | #endif /* _LTTNG_KERNEL_H */ |