Add dummy override files
[lttng-modules.git] / ltt-debugfs-abi.h
CommitLineData
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
17baffe2
MD
10 *
11 * Dual LGPL v2.1/GPL v2 license.
57a13317
MD
12 */
13
14#include <linux/fs.h>
15
e0a7a7c4 16#define LTTNG_SYM_NAME_LEN 128
d6d808f3 17
38d024ae 18enum lttng_kernel_instrumentation {
4c183524
MD
19 LTTNG_KERNEL_TRACEPOINT = 0,
20 LTTNG_KERNEL_KPROBE = 1,
21 LTTNG_KERNEL_FUNCTION = 2,
7371f44c 22 LTTNG_KERNEL_KRETPROBE = 3,
1ec65de1
MD
23 LTTNG_KERNEL_NOOP = 4, /* not hooked */
24 LTTNG_KERNEL_SYSCALLS = 5,
57a13317
MD
25};
26
96ba7208
JD
27/*
28 * LTTng consumer mode
29 */
30enum lttng_kernel_output {
31 LTTNG_KERNEL_SPLICE = 0,
32 LTTNG_KERNEL_MMAP = 1,
33};
34
57a13317
MD
35/*
36 * LTTng DebugFS ABI structures.
37 */
38
38d024ae 39struct lttng_kernel_channel {
9e245ead
MD
40 int overwrite; /* 1: overwrite, 0: discard */
41 uint64_t subbuf_size; /* in bytes */
80c16bcf 42 uint64_t num_subbuf;
9e245ead
MD
43 unsigned int switch_timer_interval; /* usecs */
44 unsigned int read_timer_interval; /* usecs */
96ba7208 45 enum lttng_kernel_output output; /* splice, mmap */
57a13317
MD
46};
47
7371f44c
MD
48struct lttng_kernel_kretprobe {
49 uint64_t addr;
50
51 uint64_t offset;
52 char symbol_name[LTTNG_SYM_NAME_LEN];
53};
54
38d024ae
MD
55/*
56 * Either addr is used, or symbol_name and offset.
57 */
58struct lttng_kernel_kprobe {
80c16bcf 59 uint64_t addr;
38d024ae 60
80c16bcf 61 uint64_t offset;
e0a7a7c4 62 char symbol_name[LTTNG_SYM_NAME_LEN];
d6d808f3
MD
63};
64
f17701fb 65struct lttng_kernel_function_tracer {
e0a7a7c4 66 char symbol_name[LTTNG_SYM_NAME_LEN];
f17701fb
MD
67};
68
d6d808f3 69struct lttng_kernel_event {
30bdb6e4 70 char name[LTTNG_SYM_NAME_LEN]; /* event name */
d6d808f3
MD
71 enum lttng_kernel_instrumentation instrumentation;
72 /* Per instrumentation type configuration */
73 union {
7371f44c 74 struct lttng_kernel_kretprobe kretprobe;
d6d808f3 75 struct lttng_kernel_kprobe kprobe;
f17701fb 76 struct lttng_kernel_function_tracer ftrace;
d6d808f3 77 } u;
38d024ae 78};
c099397a 79
80c16bcf
MD
80struct lttng_kernel_tracer_version {
81 uint32_t version;
82 uint32_t patchlevel;
83 uint32_t sublevel;
84};
85
3db41b2c
MD
86enum lttng_kernel_calibrate_type {
87 LTTNG_KERNEL_CALIBRATE_KRETPROBE,
57105fc2
MD
88};
89
3db41b2c
MD
90struct lttng_kernel_calibrate {
91 enum lttng_kernel_calibrate_type type; /* type (input) */
57105fc2
MD
92};
93
12a313a5 94enum lttng_kernel_context_type {
4c183524
MD
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,
8070f5c0
MD
105};
106
107struct lttng_kernel_perf_counter_ctx {
108 uint32_t type;
109 uint64_t config;
c24a0d71 110 char name[LTTNG_SYM_NAME_LEN];
8070f5c0
MD
111};
112
113struct lttng_kernel_context {
12a313a5 114 enum lttng_kernel_context_type ctx;
8070f5c0 115 union {
8070f5c0
MD
116 struct lttng_kernel_perf_counter_ctx perf_counter;
117 } u;
118};
119
33749530 120/* LTTng file descriptor ioctl */
ab2277d6 121#define LTTNG_KERNEL_SESSION _IO(0xF6, 0x40)
33749530
MD
122#define LTTNG_KERNEL_TRACER_VERSION \
123 _IOR(0xF6, 0x41, struct lttng_kernel_tracer_version)
271b6681 124#define LTTNG_KERNEL_TRACEPOINT_LIST _IO(0xF6, 0x42)
360f38ea 125#define LTTNG_KERNEL_WAIT_QUIESCENT _IO(0xF6, 0x43)
57105fc2 126#define LTTNG_KERNEL_CALIBRATE \
3db41b2c 127 _IOWR(0xF6, 0x44, struct lttng_kernel_calibrate)
33749530
MD
128
129/* Session FD ioctl */
130#define LTTNG_KERNEL_METADATA \
131 _IOW(0xF6, 0x50, struct lttng_kernel_channel)
ab2277d6 132#define LTTNG_KERNEL_CHANNEL \
33749530
MD
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)
ab2277d6 139#define LTTNG_KERNEL_EVENT \
33749530 140 _IOW(0xF6, 0x61, struct lttng_kernel_event)
57a13317 141
8070f5c0
MD
142/* Event and Channel FD ioctl */
143#define LTTNG_KERNEL_CONTEXT \
144 _IOW(0xF6, 0x70, struct lttng_kernel_context)
145
e64957da
MD
146/* Event, Channel and Session ioctl */
147#define LTTNG_KERNEL_ENABLE _IO(0xF6, 0x80)
148#define LTTNG_KERNEL_DISABLE _IO(0xF6, 0x81)
149
57a13317 150#endif /* _LTT_DEBUGFS_ABI_H */
This page took 0.033773 seconds and 4 git commands to generate.