Commit | Line | Data |
---|---|---|
57a13317 MD |
1 | #ifndef _LTT_DEBUGFS_ABI_H |
2 | #define _LTT_DEBUGFS_ABI_H | |
3 | ||
4 | /* | |
5 | * ltt-debugfs-abi.h | |
6 | * | |
7 | * Copyright 2010 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
8 | * | |
9 | * LTTng debugfs ABI header | |
10 | */ | |
11 | ||
12 | #include <linux/fs.h> | |
13 | ||
e0a7a7c4 | 14 | #define LTTNG_SYM_NAME_LEN 128 |
d6d808f3 | 15 | |
38d024ae MD |
16 | enum lttng_kernel_instrumentation { |
17 | LTTNG_KERNEL_TRACEPOINTS, | |
18 | LTTNG_KERNEL_KPROBES, | |
f17701fb | 19 | LTTNG_KERNEL_FUNCTION_TRACER, |
57a13317 MD |
20 | }; |
21 | ||
22 | /* | |
23 | * LTTng DebugFS ABI structures. | |
24 | */ | |
25 | ||
38d024ae | 26 | struct lttng_kernel_channel { |
9e245ead MD |
27 | int overwrite; /* 1: overwrite, 0: discard */ |
28 | uint64_t subbuf_size; /* in bytes */ | |
80c16bcf | 29 | uint64_t num_subbuf; |
9e245ead MD |
30 | unsigned int switch_timer_interval; /* usecs */ |
31 | unsigned int read_timer_interval; /* usecs */ | |
57a13317 MD |
32 | }; |
33 | ||
30bdb6e4 MD |
34 | struct lttng_kernel_tracepoint { |
35 | }; | |
36 | ||
38d024ae MD |
37 | /* |
38 | * Either addr is used, or symbol_name and offset. | |
39 | */ | |
40 | struct lttng_kernel_kprobe { | |
80c16bcf | 41 | uint64_t addr; |
38d024ae | 42 | |
80c16bcf | 43 | uint64_t offset; |
e0a7a7c4 | 44 | char symbol_name[LTTNG_SYM_NAME_LEN]; |
d6d808f3 MD |
45 | }; |
46 | ||
f17701fb | 47 | struct lttng_kernel_function_tracer { |
e0a7a7c4 | 48 | char symbol_name[LTTNG_SYM_NAME_LEN]; |
f17701fb MD |
49 | }; |
50 | ||
d6d808f3 | 51 | struct lttng_kernel_event { |
30bdb6e4 | 52 | char name[LTTNG_SYM_NAME_LEN]; /* event name */ |
d6d808f3 MD |
53 | enum lttng_kernel_instrumentation instrumentation; |
54 | /* Per instrumentation type configuration */ | |
55 | union { | |
30bdb6e4 | 56 | struct lttng_kernel_tracepoint tracepoint; |
d6d808f3 | 57 | struct lttng_kernel_kprobe kprobe; |
f17701fb | 58 | struct lttng_kernel_function_tracer ftrace; |
d6d808f3 | 59 | } u; |
38d024ae | 60 | }; |
c099397a | 61 | |
80c16bcf MD |
62 | struct lttng_kernel_tracer_version { |
63 | uint32_t version; | |
64 | uint32_t patchlevel; | |
65 | uint32_t sublevel; | |
66 | }; | |
67 | ||
38d024ae MD |
68 | #define LTTNG_KERNEL_SESSION _IO(0xF6, 0x40) |
69 | #define LTTNG_KERNEL_SESSION_START _IO(0xF6, 0x41) | |
70 | #define LTTNG_KERNEL_SESSION_STOP _IO(0xF6, 0x42) | |
71 | #define LTTNG_KERNEL_CHANNEL \ | |
72 | _IOW(0xF6, 0x43, struct lttng_kernel_channel) | |
73 | #define LTTNG_KERNEL_STREAM _IO(0xF6, 0x44) | |
74 | #define LTTNG_KERNEL_EVENT \ | |
75 | _IOW(0xF6, 0x45, struct lttng_kernel_event) | |
76 | #define LTTNG_KERNEL_METADATA \ | |
77 | _IOW(0xF6, 0x46, struct lttng_kernel_channel) | |
78 | #define LTTNG_KERNEL_KPROBE \ | |
79 | _IOW(0xF6, 0x47, struct lttng_kernel_kprobe) | |
80 | #define LTTNG_KERNEL_TRACER_VERSION \ | |
80c16bcf | 81 | _IOR(0xF6, 0x48, struct lttng_kernel_tracer_version) |
57a13317 MD |
82 | |
83 | #endif /* _LTT_DEBUGFS_ABI_H */ |