Only enable detailed syscalls for x86_64 for now
[lttng-modules.git] / ltt-debugfs-abi.h
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 * Dual LGPL v2.1/GPL v2 license.
12 */
13
14 #include <linux/fs.h>
15
16 #define LTTNG_SYM_NAME_LEN 128
17
18 enum lttng_kernel_instrumentation {
19 LTTNG_KERNEL_TRACEPOINT = 0,
20 LTTNG_KERNEL_KPROBE = 1,
21 LTTNG_KERNEL_FUNCTION = 2,
22 LTTNG_KERNEL_KRETPROBE = 3,
23 LTTNG_KERNEL_NOOP = 4, /* not hooked */
24 LTTNG_KERNEL_SYSCALLS = 5,
25 };
26
27 /*
28 * LTTng consumer mode
29 */
30 enum lttng_kernel_output {
31 LTTNG_KERNEL_SPLICE = 0,
32 LTTNG_KERNEL_MMAP = 1,
33 };
34
35 /*
36 * LTTng DebugFS ABI structures.
37 */
38
39 struct lttng_kernel_channel {
40 int overwrite; /* 1: overwrite, 0: discard */
41 uint64_t subbuf_size; /* in bytes */
42 uint64_t num_subbuf;
43 unsigned int switch_timer_interval; /* usecs */
44 unsigned int read_timer_interval; /* usecs */
45 enum lttng_kernel_output output; /* splice, mmap */
46 };
47
48 struct lttng_kernel_kretprobe {
49 uint64_t addr;
50
51 uint64_t offset;
52 char symbol_name[LTTNG_SYM_NAME_LEN];
53 };
54
55 /*
56 * Either addr is used, or symbol_name and offset.
57 */
58 struct lttng_kernel_kprobe {
59 uint64_t addr;
60
61 uint64_t offset;
62 char symbol_name[LTTNG_SYM_NAME_LEN];
63 };
64
65 struct lttng_kernel_function_tracer {
66 char symbol_name[LTTNG_SYM_NAME_LEN];
67 };
68
69 struct lttng_kernel_event {
70 char name[LTTNG_SYM_NAME_LEN]; /* event name */
71 enum lttng_kernel_instrumentation instrumentation;
72 /* Per instrumentation type configuration */
73 union {
74 struct lttng_kernel_kretprobe kretprobe;
75 struct lttng_kernel_kprobe kprobe;
76 struct lttng_kernel_function_tracer ftrace;
77 } u;
78 };
79
80 struct lttng_kernel_tracer_version {
81 uint32_t version;
82 uint32_t patchlevel;
83 uint32_t sublevel;
84 };
85
86 enum lttng_kernel_calibrate_type {
87 LTTNG_KERNEL_CALIBRATE_KRETPROBE,
88 };
89
90 struct lttng_kernel_calibrate {
91 enum lttng_kernel_calibrate_type type; /* type (input) */
92 };
93
94 enum lttng_kernel_context_type {
95 LTTNG_KERNEL_CONTEXT_PID = 0,
96 LTTNG_KERNEL_CONTEXT_PERF_COUNTER = 1,
97 LTTNG_KERNEL_CONTEXT_COMM = 2,
98 LTTNG_KERNEL_CONTEXT_PRIO = 3,
99 LTTNG_KERNEL_CONTEXT_NICE = 4,
100 LTTNG_KERNEL_CONTEXT_VPID = 5,
101 LTTNG_KERNEL_CONTEXT_TID = 6,
102 LTTNG_KERNEL_CONTEXT_VTID = 7,
103 LTTNG_KERNEL_CONTEXT_PPID = 8,
104 LTTNG_KERNEL_CONTEXT_VPPID = 9,
105 };
106
107 struct lttng_kernel_perf_counter_ctx {
108 uint32_t type;
109 uint64_t config;
110 char name[LTTNG_SYM_NAME_LEN];
111 };
112
113 struct lttng_kernel_context {
114 enum lttng_kernel_context_type ctx;
115 union {
116 struct lttng_kernel_perf_counter_ctx perf_counter;
117 } u;
118 };
119
120 /* LTTng file descriptor ioctl */
121 #define LTTNG_KERNEL_SESSION _IO(0xF6, 0x40)
122 #define LTTNG_KERNEL_TRACER_VERSION \
123 _IOR(0xF6, 0x41, struct lttng_kernel_tracer_version)
124 #define LTTNG_KERNEL_TRACEPOINT_LIST _IO(0xF6, 0x42)
125 #define LTTNG_KERNEL_WAIT_QUIESCENT _IO(0xF6, 0x43)
126 #define LTTNG_KERNEL_CALIBRATE \
127 _IOWR(0xF6, 0x44, struct lttng_kernel_calibrate)
128
129 /* Session FD ioctl */
130 #define LTTNG_KERNEL_METADATA \
131 _IOW(0xF6, 0x50, struct lttng_kernel_channel)
132 #define LTTNG_KERNEL_CHANNEL \
133 _IOW(0xF6, 0x51, struct lttng_kernel_channel)
134 #define LTTNG_KERNEL_SESSION_START _IO(0xF6, 0x52)
135 #define LTTNG_KERNEL_SESSION_STOP _IO(0xF6, 0x53)
136
137 /* Channel FD ioctl */
138 #define LTTNG_KERNEL_STREAM _IO(0xF6, 0x60)
139 #define LTTNG_KERNEL_EVENT \
140 _IOW(0xF6, 0x61, struct lttng_kernel_event)
141
142 /* Event and Channel FD ioctl */
143 #define LTTNG_KERNEL_CONTEXT \
144 _IOW(0xF6, 0x70, struct lttng_kernel_context)
145
146 /* Event, Channel and Session ioctl */
147 #define LTTNG_KERNEL_ENABLE _IO(0xF6, 0x80)
148 #define LTTNG_KERNEL_DISABLE _IO(0xF6, 0x81)
149
150 #endif /* _LTT_DEBUGFS_ABI_H */
This page took 0.032363 seconds and 4 git commands to generate.