| 1 | /* |
| 2 | * SPDX-License-Identifier: LGPL-2.1-only |
| 3 | * |
| 4 | * Copyright (C) 2005-2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
| 5 | * |
| 6 | * This contains the definitions for the Linux Trace Toolkit tracer. |
| 7 | * |
| 8 | * Ported to userspace by Pierre-Marc Fournier. |
| 9 | */ |
| 10 | |
| 11 | #ifndef _UST_COMMON_TRACER_H |
| 12 | #define _UST_COMMON_TRACER_H |
| 13 | |
| 14 | #include <stddef.h> |
| 15 | |
| 16 | #include "common/events.h" |
| 17 | |
| 18 | /* Tracer properties */ |
| 19 | #define CTF_MAGIC_NUMBER 0xC1FC1FC1 |
| 20 | #define TSDL_MAGIC_NUMBER 0x75D11D57 |
| 21 | |
| 22 | /* CTF specification version followed */ |
| 23 | #define CTF_SPEC_MAJOR 1 |
| 24 | #define CTF_SPEC_MINOR 8 |
| 25 | |
| 26 | #define LTTNG_RFLAG_EXTENDED RING_BUFFER_RFLAG_END |
| 27 | #define LTTNG_RFLAG_END (LTTNG_RFLAG_EXTENDED << 1) |
| 28 | |
| 29 | #define LTTNG_TRACE_PRINTF_BUFSIZE 512 |
| 30 | |
| 31 | /* |
| 32 | * LTTng client type enumeration. Used by the consumer to map the |
| 33 | * callbacks from its own address space. |
| 34 | */ |
| 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, |
| 42 | }; |
| 43 | |
| 44 | struct lttng_transport *lttng_ust_transport_find(const char *name) |
| 45 | __attribute__((visibility("hidden"))); |
| 46 | |
| 47 | void lttng_transport_register(struct lttng_transport *transport) |
| 48 | __attribute__((visibility("hidden"))); |
| 49 | |
| 50 | void lttng_transport_unregister(struct lttng_transport *transport) |
| 51 | __attribute__((visibility("hidden"))); |
| 52 | |
| 53 | |
| 54 | struct lttng_counter_transport *lttng_counter_transport_find(const char *name) |
| 55 | __attribute__((visibility("hidden"))); |
| 56 | |
| 57 | void lttng_counter_transport_register(struct lttng_counter_transport *transport) |
| 58 | __attribute__((visibility("hidden"))); |
| 59 | |
| 60 | void lttng_counter_transport_unregister(struct lttng_counter_transport *transport) |
| 61 | __attribute__((visibility("hidden"))); |
| 62 | |
| 63 | |
| 64 | size_t lttng_ust_dummy_get_size(void *priv, struct lttng_ust_probe_ctx *probe_ctx, |
| 65 | size_t offset) |
| 66 | __attribute__((visibility("hidden"))); |
| 67 | |
| 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"))); |
| 72 | |
| 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"))); |
| 76 | |
| 77 | int lttng_context_is_app(const char *name) |
| 78 | __attribute__((visibility("hidden"))); |
| 79 | |
| 80 | struct lttng_ust_channel_buffer *lttng_ust_alloc_channel_buffer(void) |
| 81 | __attribute__((visibility("hidden"))); |
| 82 | |
| 83 | struct lttng_ust_channel_counter *lttng_ust_alloc_channel_counter(void) |
| 84 | __attribute__((visibility("hidden"))); |
| 85 | |
| 86 | void lttng_ust_free_channel_common(struct lttng_ust_channel_common *chan) |
| 87 | __attribute__((visibility("hidden"))); |
| 88 | |
| 89 | #endif /* _UST_COMMON_TRACER_H */ |