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)
30 * LTTng client type enumeration. Used by the consumer to map the
31 * callbacks from its own address space.
33 enum lttng_client_types
{
34 LTTNG_CLIENT_METADATA
= 0,
35 LTTNG_CLIENT_DISCARD
= 1,
36 LTTNG_CLIENT_OVERWRITE
= 2,
37 LTTNG_CLIENT_DISCARD_RT
= 3,
38 LTTNG_CLIENT_OVERWRITE_RT
= 4,
39 LTTNG_NR_CLIENT_TYPES
,
42 struct lttng_transport
*lttng_ust_transport_find(const char *name
)
43 __attribute__((visibility("hidden")));
45 void lttng_transport_register(struct lttng_transport
*transport
)
46 __attribute__((visibility("hidden")));
48 void lttng_transport_unregister(struct lttng_transport
*transport
)
49 __attribute__((visibility("hidden")));
52 struct lttng_counter_transport
*lttng_counter_transport_find(const char *name
)
53 __attribute__((visibility("hidden")));
55 void lttng_counter_transport_register(struct lttng_counter_transport
*transport
)
56 __attribute__((visibility("hidden")));
58 void lttng_counter_transport_unregister(struct lttng_counter_transport
*transport
)
59 __attribute__((visibility("hidden")));
62 size_t lttng_ust_dummy_get_size(void *priv
, struct lttng_ust_probe_ctx
*probe_ctx
,
64 __attribute__((visibility("hidden")));
66 void lttng_ust_dummy_record(void *priv
, struct lttng_ust_probe_ctx
*probe_ctx
,
67 struct lttng_ust_ring_buffer_ctx
*ctx
,
68 struct lttng_ust_channel_buffer
*chan
)
69 __attribute__((visibility("hidden")));
71 void lttng_ust_dummy_get_value(void *priv
, struct lttng_ust_probe_ctx
*probe_ctx
,
72 struct lttng_ust_ctx_value
*value
)
73 __attribute__((visibility("hidden")));
75 int lttng_context_is_app(const char *name
)
76 __attribute__((visibility("hidden")));
78 struct lttng_ust_channel_buffer
*lttng_ust_alloc_channel_buffer(void)
79 __attribute__((visibility("hidden")));
81 void lttng_ust_free_channel_common(struct lttng_ust_channel_common
*chan
)
82 __attribute__((visibility("hidden")));
84 #endif /* _UST_COMMON_TRACER_H */