2 * SPDX-License-Identifier: LGPL-2.1-only
4 * Copyright (C) 2005-2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 * This contains the definitions for the Linux Trace Toolkit tracer.
8 * Ported to userspace by Pierre-Marc Fournier.
11 #ifndef _UST_COMMON_TRACER_H
12 #define _UST_COMMON_TRACER_H
16 #include "common/events.h"
18 /* Tracer properties */
19 #define CTF_MAGIC_NUMBER 0xC1FC1FC1
20 #define TSDL_MAGIC_NUMBER 0x75D11D57
22 /* CTF specification version followed */
23 #define CTF_SPEC_MAJOR 1
24 #define CTF_SPEC_MINOR 8
26 #define LTTNG_RFLAG_EXTENDED RING_BUFFER_RFLAG_END
27 #define LTTNG_RFLAG_END (LTTNG_RFLAG_EXTENDED << 1)
29 #define LTTNG_TRACE_PRINTF_BUFSIZE 512
32 * LTTng client type enumeration. Used by the consumer to map the
33 * callbacks from its own address space.
35 enum lttng_client_types
{
36 LTTNG_CLIENT_METADATA
= 0,
37 LTTNG_CLIENT_DISCARD
= 1,
38 LTTNG_CLIENT_OVERWRITE
= 2,
39 LTTNG_CLIENT_DISCARD_RT
= 3,
40 LTTNG_CLIENT_OVERWRITE_RT
= 4,
41 LTTNG_NR_CLIENT_TYPES
,
44 struct lttng_transport
*lttng_ust_transport_find(const char *name
)
45 __attribute__((visibility("hidden")));
47 void lttng_transport_register(struct lttng_transport
*transport
)
48 __attribute__((visibility("hidden")));
50 void lttng_transport_unregister(struct lttng_transport
*transport
)
51 __attribute__((visibility("hidden")));
54 struct lttng_counter_transport
*lttng_counter_transport_find(const char *name
)
55 __attribute__((visibility("hidden")));
57 void lttng_counter_transport_register(struct lttng_counter_transport
*transport
)
58 __attribute__((visibility("hidden")));
60 void lttng_counter_transport_unregister(struct lttng_counter_transport
*transport
)
61 __attribute__((visibility("hidden")));
64 size_t lttng_ust_dummy_get_size(void *priv
, struct lttng_ust_probe_ctx
*probe_ctx
,
66 __attribute__((visibility("hidden")));
68 void lttng_ust_dummy_record(void *priv
, struct lttng_ust_probe_ctx
*probe_ctx
,
69 struct lttng_ust_ring_buffer_ctx
*ctx
,
70 struct lttng_ust_channel_buffer
*chan
)
71 __attribute__((visibility("hidden")));
73 void lttng_ust_dummy_get_value(void *priv
, struct lttng_ust_probe_ctx
*probe_ctx
,
74 struct lttng_ust_ctx_value
*value
)
75 __attribute__((visibility("hidden")));
77 int lttng_context_is_app(const char *name
)
78 __attribute__((visibility("hidden")));
80 struct lttng_ust_channel_buffer
*lttng_ust_alloc_channel_buffer(void)
81 __attribute__((visibility("hidden")));
83 struct lttng_ust_channel_counter
*lttng_ust_alloc_channel_counter(void)
84 __attribute__((visibility("hidden")));
86 void lttng_ust_free_channel_common(struct lttng_ust_channel_common
*chan
)
87 __attribute__((visibility("hidden")));
89 #endif /* _UST_COMMON_TRACER_H */