Set SOCK_CLOEXEC on socket connected to
[lttng-ust.git] / include / ust / lttng-ust-abi.h
CommitLineData
9f3fdbc6
MD
1#ifndef _LTTNG_UST_ABI_H
2#define _LTTNG_UST_ABI_H
3
4/*
5 * lttng-ust-abi.h
6 *
7 * Copyright 2010-2011 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 *
9 * LTTng-UST ABI header
10 *
11 * Dual LGPL v2.1/GPL v2 license.
12 */
13
0a42beb6
MD
14#include <stdint.h>
15
9f3fdbc6
MD
16#define LTTNG_UST_SYM_NAME_LEN 128
17
18enum lttng_ust_instrumentation {
19 LTTNG_UST_TRACEPOINT = 0,
20};
21
22/*
23 * LTTng consumer mode
24 */
25enum lttng_ust_output {
26 LTTNG_UST_MMAP = 0,
27};
28
29/*
30 * LTTng DebugFS ABI structures.
31 */
32
33struct lttng_ust_channel {
34 int overwrite; /* 1: overwrite, 0: discard */
35 uint64_t subbuf_size; /* in bytes */
36 uint64_t num_subbuf;
37 unsigned int switch_timer_interval; /* usecs */
38 unsigned int read_timer_interval; /* usecs */
39 enum lttng_ust_output output; /* mmap */
40};
41
42struct lttng_ust_event {
43 char name[LTTNG_UST_SYM_NAME_LEN]; /* event name */
44 enum lttng_ust_instrumentation instrumentation;
45 /* Per instrumentation type configuration */
46 union {
47 } u;
48};
49
50struct lttng_ust_tracer_version {
51 uint32_t version;
52 uint32_t patchlevel;
53 uint32_t sublevel;
54};
55
56enum lttng_ust_context_type {
57 LTTNG_UST_CONTEXT_VTID = 0,
58};
59
60struct lttng_ust_context {
61 enum lttng_ust_context_type ctx;
62 union {
63 } u;
64};
65
66#define _UST_CMD(minor) (minor)
67#define _UST_CMDR(minor, type) (minor)
68#define _UST_CMDW(minor, type) (minor)
69
70/* LTTng-UST commands */
71#define LTTNG_UST_SESSION _UST_CMD(0x40)
72#define LTTNG_UST_TRACER_VERSION \
73 _UST_CMDR(0x41, struct lttng_ust_tracer_version)
74#define LTTNG_UST_TRACEPOINT_LIST _UST_CMD(0x42)
75#define LTTNG_UST_WAIT_QUIESCENT _UST_CMD(0x43)
76
77/* Session FD ioctl */
78#define LTTNG_UST_METADATA \
79 _UST_CMDW(0x50, struct lttng_ust_channel)
80#define LTTNG_UST_CHANNEL \
81 _UST_CMDW(0x51, struct lttng_ust_channel)
82#define LTTNG_UST_SESSION_START _UST_CMD(0x52)
83#define LTTNG_UST_SESSION_STOP _UST_CMD(0x53)
84
85/* Channel FD ioctl */
86#define LTTNG_UST_STREAM _UST_CMD(0x60)
87#define LTTNG_UST_EVENT \
88 _UST_CMDW(0x61, struct lttng_ust_event)
89
90/* Event and Channel FD ioctl */
91#define LTTNG_UST_CONTEXT \
92 _UST_CMDW(0x70, struct lttng_ust_context)
93
94/* Event, Channel and Session ioctl */
95#define LTTNG_UST_ENABLE _UST_CMD(0x80)
96#define LTTNG_UST_DISABLE _UST_CMD(0x81)
97
98#endif /* _LTTNG_UST_ABI_H */
This page took 0.026094 seconds and 4 git commands to generate.