| 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 core definitions for the Linux Trace Toolkit. |
| 7 | */ |
| 8 | |
| 9 | #ifndef _LTTNG_TRACER_CORE_H |
| 10 | #define _LTTNG_TRACER_CORE_H |
| 11 | |
| 12 | #include <stddef.h> |
| 13 | #include <urcu/arch.h> |
| 14 | #include <urcu/list.h> |
| 15 | #include <lttng/ust-tracer.h> |
| 16 | #include <lttng/ringbuffer-context.h> |
| 17 | #include "common/logging.h" |
| 18 | |
| 19 | struct lttng_ust_session; |
| 20 | struct lttng_ust_channel_buffer; |
| 21 | struct lttng_ust_ctx_field; |
| 22 | struct lttng_ust_ring_buffer_ctx; |
| 23 | struct lttng_ust_ctx_value; |
| 24 | struct lttng_ust_event_recorder; |
| 25 | struct lttng_ust_event_notifier; |
| 26 | struct lttng_ust_notification_ctx; |
| 27 | |
| 28 | int ust_lock(void) __attribute__ ((warn_unused_result)) |
| 29 | __attribute__((visibility("hidden"))); |
| 30 | |
| 31 | void ust_lock_nocheck(void) |
| 32 | __attribute__((visibility("hidden"))); |
| 33 | |
| 34 | void ust_unlock(void) |
| 35 | __attribute__((visibility("hidden"))); |
| 36 | |
| 37 | void lttng_ust_fixup_tls(void) |
| 38 | __attribute__((visibility("hidden"))); |
| 39 | |
| 40 | void lttng_fixup_event_tls(void) |
| 41 | __attribute__((visibility("hidden"))); |
| 42 | |
| 43 | void lttng_fixup_vtid_tls(void) |
| 44 | __attribute__((visibility("hidden"))); |
| 45 | |
| 46 | void lttng_fixup_procname_tls(void) |
| 47 | __attribute__((visibility("hidden"))); |
| 48 | |
| 49 | void lttng_fixup_cgroup_ns_tls(void) |
| 50 | __attribute__((visibility("hidden"))); |
| 51 | |
| 52 | void lttng_fixup_ipc_ns_tls(void) |
| 53 | __attribute__((visibility("hidden"))); |
| 54 | |
| 55 | void lttng_fixup_net_ns_tls(void) |
| 56 | __attribute__((visibility("hidden"))); |
| 57 | |
| 58 | void lttng_fixup_time_ns_tls(void) |
| 59 | __attribute__((visibility("hidden"))); |
| 60 | |
| 61 | void lttng_fixup_uts_ns_tls(void) |
| 62 | __attribute__((visibility("hidden"))); |
| 63 | |
| 64 | const char *lttng_ust_obj_get_name(int id) |
| 65 | __attribute__((visibility("hidden"))); |
| 66 | |
| 67 | int lttng_get_notify_socket(void *owner) |
| 68 | __attribute__((visibility("hidden"))); |
| 69 | |
| 70 | char* lttng_ust_sockinfo_get_procname(void *owner) |
| 71 | __attribute__((visibility("hidden"))); |
| 72 | |
| 73 | void lttng_ust_sockinfo_session_enabled(void *owner) |
| 74 | __attribute__((visibility("hidden"))); |
| 75 | |
| 76 | ssize_t lttng_ust_read(int fd, void *buf, size_t len) |
| 77 | __attribute__((visibility("hidden"))); |
| 78 | |
| 79 | size_t lttng_ust_dummy_get_size(void *priv, size_t offset) |
| 80 | __attribute__((visibility("hidden"))); |
| 81 | |
| 82 | void lttng_ust_dummy_record(void *priv, struct lttng_ust_ring_buffer_ctx *ctx, |
| 83 | struct lttng_ust_channel_buffer *chan) |
| 84 | __attribute__((visibility("hidden"))); |
| 85 | |
| 86 | void lttng_ust_dummy_get_value(void *priv, struct lttng_ust_ctx_value *value) |
| 87 | __attribute__((visibility("hidden"))); |
| 88 | |
| 89 | void lttng_event_notifier_notification_send( |
| 90 | const struct lttng_ust_event_notifier *event_notifier, |
| 91 | const char *stack_data, |
| 92 | struct lttng_ust_notification_ctx *notif_ctx) |
| 93 | __attribute__((visibility("hidden"))); |
| 94 | |
| 95 | struct lttng_counter_transport *lttng_counter_transport_find(const char *name) |
| 96 | __attribute__((visibility("hidden"))); |
| 97 | |
| 98 | void lttng_counter_transport_register(struct lttng_counter_transport *transport) |
| 99 | __attribute__((visibility("hidden"))); |
| 100 | |
| 101 | void lttng_counter_transport_unregister(struct lttng_counter_transport *transport) |
| 102 | __attribute__((visibility("hidden"))); |
| 103 | |
| 104 | #ifdef HAVE_LINUX_PERF_EVENT_H |
| 105 | void lttng_ust_fixup_perf_counter_tls(void) |
| 106 | __attribute__((visibility("hidden"))); |
| 107 | |
| 108 | void lttng_perf_lock(void) |
| 109 | __attribute__((visibility("hidden"))); |
| 110 | |
| 111 | void lttng_perf_unlock(void) |
| 112 | __attribute__((visibility("hidden"))); |
| 113 | #else /* #ifdef HAVE_LINUX_PERF_EVENT_H */ |
| 114 | static inline |
| 115 | void lttng_ust_fixup_perf_counter_tls(void) |
| 116 | { |
| 117 | } |
| 118 | static inline |
| 119 | void lttng_perf_lock(void) |
| 120 | { |
| 121 | } |
| 122 | static inline |
| 123 | void lttng_perf_unlock(void) |
| 124 | { |
| 125 | } |
| 126 | #endif /* #else #ifdef HAVE_LINUX_PERF_EVENT_H */ |
| 127 | |
| 128 | #endif /* _LTTNG_TRACER_CORE_H */ |