staging: remove intel_sst driver
[zen-stable.git] / drivers / staging / lttng / ltt-debugfs-abi.h
bloba018297f7fb513f12951f29103ebbf078eb62999
1 #ifndef _LTT_DEBUGFS_ABI_H
2 #define _LTT_DEBUGFS_ABI_H
4 /*
5 * ltt-debugfs-abi.h
7 * Copyright 2010 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 * LTTng debugfs ABI header
11 * Dual LGPL v2.1/GPL v2 license.
14 #include <linux/fs.h>
16 #define LTTNG_SYM_NAME_LEN 256
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_SYSCALL = 5,
28 * LTTng consumer mode
30 enum lttng_kernel_output {
31 LTTNG_KERNEL_SPLICE = 0,
32 LTTNG_KERNEL_MMAP = 1,
36 * LTTng DebugFS ABI structures.
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 */
48 struct lttng_kernel_kretprobe {
49 uint64_t addr;
51 uint64_t offset;
52 char symbol_name[LTTNG_SYM_NAME_LEN];
56 * Either addr is used, or symbol_name and offset.
58 struct lttng_kernel_kprobe {
59 uint64_t addr;
61 uint64_t offset;
62 char symbol_name[LTTNG_SYM_NAME_LEN];
65 struct lttng_kernel_function_tracer {
66 char symbol_name[LTTNG_SYM_NAME_LEN];
70 * For syscall tracing, name = '\0' means "enable all".
72 struct lttng_kernel_event {
73 char name[LTTNG_SYM_NAME_LEN]; /* event name */
74 enum lttng_kernel_instrumentation instrumentation;
75 /* Per instrumentation type configuration */
76 union {
77 struct lttng_kernel_kretprobe kretprobe;
78 struct lttng_kernel_kprobe kprobe;
79 struct lttng_kernel_function_tracer ftrace;
80 } u;
83 struct lttng_kernel_tracer_version {
84 uint32_t version;
85 uint32_t patchlevel;
86 uint32_t sublevel;
89 enum lttng_kernel_calibrate_type {
90 LTTNG_KERNEL_CALIBRATE_KRETPROBE,
93 struct lttng_kernel_calibrate {
94 enum lttng_kernel_calibrate_type type; /* type (input) */
97 enum lttng_kernel_context_type {
98 LTTNG_KERNEL_CONTEXT_PID = 0,
99 LTTNG_KERNEL_CONTEXT_PERF_COUNTER = 1,
100 LTTNG_KERNEL_CONTEXT_PROCNAME = 2,
101 LTTNG_KERNEL_CONTEXT_PRIO = 3,
102 LTTNG_KERNEL_CONTEXT_NICE = 4,
103 LTTNG_KERNEL_CONTEXT_VPID = 5,
104 LTTNG_KERNEL_CONTEXT_TID = 6,
105 LTTNG_KERNEL_CONTEXT_VTID = 7,
106 LTTNG_KERNEL_CONTEXT_PPID = 8,
107 LTTNG_KERNEL_CONTEXT_VPPID = 9,
110 struct lttng_kernel_perf_counter_ctx {
111 uint32_t type;
112 uint64_t config;
113 char name[LTTNG_SYM_NAME_LEN];
116 struct lttng_kernel_context {
117 enum lttng_kernel_context_type ctx;
118 union {
119 struct lttng_kernel_perf_counter_ctx perf_counter;
120 } u;
123 /* LTTng file descriptor ioctl */
124 #define LTTNG_KERNEL_SESSION _IO(0xF6, 0x40)
125 #define LTTNG_KERNEL_TRACER_VERSION \
126 _IOR(0xF6, 0x41, struct lttng_kernel_tracer_version)
127 #define LTTNG_KERNEL_TRACEPOINT_LIST _IO(0xF6, 0x42)
128 #define LTTNG_KERNEL_WAIT_QUIESCENT _IO(0xF6, 0x43)
129 #define LTTNG_KERNEL_CALIBRATE \
130 _IOWR(0xF6, 0x44, struct lttng_kernel_calibrate)
132 /* Session FD ioctl */
133 #define LTTNG_KERNEL_METADATA \
134 _IOW(0xF6, 0x50, struct lttng_kernel_channel)
135 #define LTTNG_KERNEL_CHANNEL \
136 _IOW(0xF6, 0x51, struct lttng_kernel_channel)
137 #define LTTNG_KERNEL_SESSION_START _IO(0xF6, 0x52)
138 #define LTTNG_KERNEL_SESSION_STOP _IO(0xF6, 0x53)
140 /* Channel FD ioctl */
141 #define LTTNG_KERNEL_STREAM _IO(0xF6, 0x60)
142 #define LTTNG_KERNEL_EVENT \
143 _IOW(0xF6, 0x61, struct lttng_kernel_event)
145 /* Event and Channel FD ioctl */
146 #define LTTNG_KERNEL_CONTEXT \
147 _IOW(0xF6, 0x70, struct lttng_kernel_context)
149 /* Event, Channel and Session ioctl */
150 #define LTTNG_KERNEL_ENABLE _IO(0xF6, 0x80)
151 #define LTTNG_KERNEL_DISABLE _IO(0xF6, 0x81)
153 #endif /* _LTT_DEBUGFS_ABI_H */