Commit | Line | Data |
---|---|---|
4fbf9cd1 | 1 | /* |
c0c0989a MJ |
2 | * SPDX-License-Identifier: LGPL-2.1-only |
3 | * | |
4fbf9cd1 MD |
4 | * Copyright (C) 2005-2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
5 | * | |
6 | * This contains the core definitions for the Linux Trace Toolkit. | |
4fbf9cd1 MD |
7 | */ |
8 | ||
c0c0989a MJ |
9 | #ifndef _LTTNG_TRACER_CORE_H |
10 | #define _LTTNG_TRACER_CORE_H | |
11 | ||
b728d87e MD |
12 | #include <stddef.h> |
13 | #include <urcu/arch.h> | |
4fbf9cd1 | 14 | #include <urcu/list.h> |
44c72f10 | 15 | #include <lttng/ust-tracer.h> |
0b4b8811 | 16 | #include <lttng/ust-ringbuffer-context.h> |
9d315d6d | 17 | #include "common/logging.h" |
4fbf9cd1 | 18 | |
f69fe5fb | 19 | struct lttng_ust_session; |
e7bc0ef6 | 20 | struct lttng_ust_channel_buffer; |
daacdbfc | 21 | struct lttng_ust_ctx_field; |
b5457df5 | 22 | struct lttng_ust_ring_buffer_ctx; |
daacdbfc | 23 | struct lttng_ust_ctx_value; |
e7bc0ef6 | 24 | struct lttng_ust_event_recorder; |
d7d45c0d | 25 | struct lttng_ust_event_notifier; |
a2e4d05e | 26 | struct lttng_ust_notification_ctx; |
4fbf9cd1 | 27 | |
1d18d519 MJ |
28 | int ust_lock(void) __attribute__ ((warn_unused_result)) |
29 | __attribute__((visibility("hidden"))); | |
ddabe860 | 30 | |
1d18d519 MJ |
31 | void ust_lock_nocheck(void) |
32 | __attribute__((visibility("hidden"))); | |
ddabe860 | 33 | |
1d18d519 MJ |
34 | void ust_unlock(void) |
35 | __attribute__((visibility("hidden"))); | |
8165c8da | 36 | |
a9fd951a | 37 | void lttng_ust_alloc_tls(void) |
1d18d519 | 38 | __attribute__((visibility("hidden"))); |
ddabe860 | 39 | |
a9fd951a | 40 | void lttng_vtid_alloc_tls(void) |
1d18d519 | 41 | __attribute__((visibility("hidden"))); |
ddabe860 | 42 | |
a9fd951a | 43 | void lttng_procname_alloc_tls(void) |
1d18d519 | 44 | __attribute__((visibility("hidden"))); |
ddabe860 | 45 | |
a9fd951a | 46 | void lttng_cgroup_ns_alloc_tls(void) |
1d18d519 | 47 | __attribute__((visibility("hidden"))); |
ddabe860 | 48 | |
a9fd951a | 49 | void lttng_ipc_ns_alloc_tls(void) |
1d18d519 | 50 | __attribute__((visibility("hidden"))); |
ddabe860 | 51 | |
a9fd951a | 52 | void lttng_net_ns_alloc_tls(void) |
1d18d519 | 53 | __attribute__((visibility("hidden"))); |
ddabe860 | 54 | |
a9fd951a | 55 | void lttng_time_ns_alloc_tls(void) |
1d18d519 | 56 | __attribute__((visibility("hidden"))); |
ddabe860 | 57 | |
a9fd951a | 58 | void lttng_uts_ns_alloc_tls(void) |
1d18d519 | 59 | __attribute__((visibility("hidden"))); |
eddd8d5d | 60 | |
1d18d519 MJ |
61 | const char *lttng_ust_obj_get_name(int id) |
62 | __attribute__((visibility("hidden"))); | |
74d81a6c | 63 | |
1d18d519 MJ |
64 | int lttng_get_notify_socket(void *owner) |
65 | __attribute__((visibility("hidden"))); | |
32ce8569 | 66 | |
1d18d519 MJ |
67 | char* lttng_ust_sockinfo_get_procname(void *owner) |
68 | __attribute__((visibility("hidden"))); | |
94be38e8 | 69 | |
1d18d519 MJ |
70 | void lttng_ust_sockinfo_session_enabled(void *owner) |
71 | __attribute__((visibility("hidden"))); | |
95c25348 | 72 | |
b2e37d27 MD |
73 | size_t lttng_ust_dummy_get_size(void *priv, struct lttng_ust_probe_ctx *probe_ctx, |
74 | size_t offset) | |
1d18d519 | 75 | __attribute__((visibility("hidden"))); |
ddabe860 | 76 | |
b2e37d27 MD |
77 | void lttng_ust_dummy_record(void *priv, struct lttng_ust_probe_ctx *probe_ctx, |
78 | struct lttng_ust_ring_buffer_ctx *ctx, | |
79 | struct lttng_ust_channel_buffer *chan) | |
1d18d519 MJ |
80 | __attribute__((visibility("hidden"))); |
81 | ||
b2e37d27 MD |
82 | void lttng_ust_dummy_get_value(void *priv, struct lttng_ust_probe_ctx *probe_ctx, |
83 | struct lttng_ust_ctx_value *value) | |
1d18d519 | 84 | __attribute__((visibility("hidden"))); |
ce7352a2 | 85 | |
cab88ff8 | 86 | void lttng_event_notifier_notification_send( |
cda77256 | 87 | const struct lttng_ust_event_notifier *event_notifier, |
a2e4d05e | 88 | const char *stack_data, |
b2e37d27 | 89 | struct lttng_ust_probe_ctx *probe_ctx, |
1d18d519 MJ |
90 | struct lttng_ust_notification_ctx *notif_ctx) |
91 | __attribute__((visibility("hidden"))); | |
cab88ff8 | 92 | |
1d18d519 MJ |
93 | struct lttng_counter_transport *lttng_counter_transport_find(const char *name) |
94 | __attribute__((visibility("hidden"))); | |
ddabe860 | 95 | |
1d18d519 MJ |
96 | void lttng_counter_transport_register(struct lttng_counter_transport *transport) |
97 | __attribute__((visibility("hidden"))); | |
ddabe860 | 98 | |
1d18d519 MJ |
99 | void lttng_counter_transport_unregister(struct lttng_counter_transport *transport) |
100 | __attribute__((visibility("hidden"))); | |
23d128de | 101 | |
eeef0055 | 102 | #ifdef HAVE_LINUX_PERF_EVENT_H |
a9fd951a | 103 | void lttng_ust_perf_counter_alloc_tls(void) |
1d18d519 | 104 | __attribute__((visibility("hidden"))); |
ddabe860 | 105 | |
1d18d519 MJ |
106 | void lttng_perf_lock(void) |
107 | __attribute__((visibility("hidden"))); | |
ddabe860 | 108 | |
1d18d519 MJ |
109 | void lttng_perf_unlock(void) |
110 | __attribute__((visibility("hidden"))); | |
eeef0055 | 111 | #else /* #ifdef HAVE_LINUX_PERF_EVENT_H */ |
20142124 | 112 | static inline |
a9fd951a | 113 | void lttng_ust_perf_counter_alloc_tls(void) |
20142124 MD |
114 | { |
115 | } | |
116 | static inline | |
117 | void lttng_perf_lock(void) | |
118 | { | |
119 | } | |
120 | static inline | |
121 | void lttng_perf_unlock(void) | |
122 | { | |
123 | } | |
eeef0055 | 124 | #endif /* #else #ifdef HAVE_LINUX_PERF_EVENT_H */ |
20142124 | 125 | |
7dd08bec | 126 | #endif /* _LTTNG_TRACER_CORE_H */ |