Fix too large copy of sys enter event
[deliverable/lttng-modules.git] / ltt-debugfs-abi.h
... / ...
CommitLineData
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
14#define LTTNG_SYM_NAME_LEN 128
15
16enum lttng_kernel_instrumentation {
17 LTTNG_KERNEL_TRACEPOINT,
18 LTTNG_KERNEL_KPROBE,
19 LTTNG_KERNEL_FUNCTION,
20};
21
22/*
23 * LTTng DebugFS ABI structures.
24 */
25
26struct lttng_kernel_channel {
27 int overwrite; /* 1: overwrite, 0: discard */
28 uint64_t subbuf_size; /* in bytes */
29 uint64_t num_subbuf;
30 unsigned int switch_timer_interval; /* usecs */
31 unsigned int read_timer_interval; /* usecs */
32};
33
34struct lttng_kernel_tracepoint {
35};
36
37/*
38 * Either addr is used, or symbol_name and offset.
39 */
40struct lttng_kernel_kprobe {
41 uint64_t addr;
42
43 uint64_t offset;
44 char symbol_name[LTTNG_SYM_NAME_LEN];
45};
46
47struct lttng_kernel_function_tracer {
48 char symbol_name[LTTNG_SYM_NAME_LEN];
49};
50
51struct lttng_kernel_event {
52 char name[LTTNG_SYM_NAME_LEN]; /* event name */
53 enum lttng_kernel_instrumentation instrumentation;
54 /* Per instrumentation type configuration */
55 union {
56 struct lttng_kernel_tracepoint tracepoint;
57 struct lttng_kernel_kprobe kprobe;
58 struct lttng_kernel_function_tracer ftrace;
59 } u;
60};
61
62struct lttng_kernel_tracer_version {
63 uint32_t version;
64 uint32_t patchlevel;
65 uint32_t sublevel;
66};
67
68enum lttng_context {
69 LTTNG_CONTEXT_PID,
70 LTTNG_CONTEXT_PERF_COUNTER,
71};
72
73struct lttng_kernel_pid_ctx {
74};
75
76struct lttng_kernel_perf_counter_ctx {
77 uint32_t type;
78 uint64_t config;
79};
80
81struct lttng_kernel_context {
82 enum lttng_context ctx;
83 union {
84 struct lttng_kernel_pid_ctx pid;
85 struct lttng_kernel_perf_counter_ctx perf_counter;
86 } u;
87};
88
89/* LTTng file descriptor ioctl */
90#define LTTNG_KERNEL_SESSION _IO(0xF6, 0x40)
91#define LTTNG_KERNEL_TRACER_VERSION \
92 _IOR(0xF6, 0x41, struct lttng_kernel_tracer_version)
93#define LTTNG_KERNEL_TRACEPOINT_LIST _IO(0xF6, 0x42)
94
95/* Session FD ioctl */
96#define LTTNG_KERNEL_METADATA \
97 _IOW(0xF6, 0x50, struct lttng_kernel_channel)
98#define LTTNG_KERNEL_CHANNEL \
99 _IOW(0xF6, 0x51, struct lttng_kernel_channel)
100#define LTTNG_KERNEL_SESSION_START _IO(0xF6, 0x52)
101#define LTTNG_KERNEL_SESSION_STOP _IO(0xF6, 0x53)
102
103/* Channel FD ioctl */
104#define LTTNG_KERNEL_STREAM _IO(0xF6, 0x60)
105#define LTTNG_KERNEL_EVENT \
106 _IOW(0xF6, 0x61, struct lttng_kernel_event)
107
108/* Event and Channel FD ioctl */
109#define LTTNG_KERNEL_CONTEXT \
110 _IOW(0xF6, 0x70, struct lttng_kernel_context)
111
112#endif /* _LTT_DEBUGFS_ABI_H */
This page took 0.024338 seconds and 5 git commands to generate.