2 * SPDX-License-Identifier: LGPL-2.1-only
4 * Copyright (C) 2005-2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 * This contains the core definitions for the Linux Trace Toolkit.
9 #ifndef _LTTNG_TRACER_CORE_H
10 #define _LTTNG_TRACER_CORE_H
13 #include <urcu/arch.h>
14 #include <urcu/list.h>
15 #include <lttng/ust-tracer.h>
16 #include <lttng/ust-ringbuffer-context.h>
17 #include "common/logging.h"
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
;
28 int ust_lock(void) __attribute__ ((warn_unused_result
))
29 __attribute__((visibility("hidden")));
31 void ust_lock_nocheck(void)
32 __attribute__((visibility("hidden")));
35 __attribute__((visibility("hidden")));
37 void lttng_ust_alloc_tls(void)
38 __attribute__((visibility("hidden")));
40 void lttng_vtid_alloc_tls(void)
41 __attribute__((visibility("hidden")));
43 void lttng_procname_alloc_tls(void)
44 __attribute__((visibility("hidden")));
46 void lttng_cgroup_ns_alloc_tls(void)
47 __attribute__((visibility("hidden")));
49 void lttng_ipc_ns_alloc_tls(void)
50 __attribute__((visibility("hidden")));
52 void lttng_net_ns_alloc_tls(void)
53 __attribute__((visibility("hidden")));
55 void lttng_time_ns_alloc_tls(void)
56 __attribute__((visibility("hidden")));
58 void lttng_uts_ns_alloc_tls(void)
59 __attribute__((visibility("hidden")));
61 const char *lttng_ust_obj_get_name(int id
)
62 __attribute__((visibility("hidden")));
64 int lttng_get_notify_socket(void *owner
)
65 __attribute__((visibility("hidden")));
67 char* lttng_ust_sockinfo_get_procname(void *owner
)
68 __attribute__((visibility("hidden")));
70 void lttng_ust_sockinfo_session_enabled(void *owner
)
71 __attribute__((visibility("hidden")));
73 size_t lttng_ust_dummy_get_size(void *priv
, struct lttng_ust_probe_ctx
*probe_ctx
,
75 __attribute__((visibility("hidden")));
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
)
80 __attribute__((visibility("hidden")));
82 void lttng_ust_dummy_get_value(void *priv
, struct lttng_ust_probe_ctx
*probe_ctx
,
83 struct lttng_ust_ctx_value
*value
)
84 __attribute__((visibility("hidden")));
86 void lttng_event_notifier_notification_send(
87 const struct lttng_ust_event_notifier
*event_notifier
,
88 const char *stack_data
,
89 struct lttng_ust_probe_ctx
*probe_ctx
,
90 struct lttng_ust_notification_ctx
*notif_ctx
)
91 __attribute__((visibility("hidden")));
93 struct lttng_counter_transport
*lttng_counter_transport_find(const char *name
)
94 __attribute__((visibility("hidden")));
96 void lttng_counter_transport_register(struct lttng_counter_transport
*transport
)
97 __attribute__((visibility("hidden")));
99 void lttng_counter_transport_unregister(struct lttng_counter_transport
*transport
)
100 __attribute__((visibility("hidden")));
102 #ifdef HAVE_LINUX_PERF_EVENT_H
103 void lttng_ust_perf_counter_alloc_tls(void)
104 __attribute__((visibility("hidden")));
106 void lttng_perf_lock(void)
107 __attribute__((visibility("hidden")));
109 void lttng_perf_unlock(void)
110 __attribute__((visibility("hidden")));
111 #else /* #ifdef HAVE_LINUX_PERF_EVENT_H */
113 void lttng_ust_perf_counter_alloc_tls(void)
117 void lttng_perf_lock(void)
121 void lttng_perf_unlock(void)
124 #endif /* #else #ifdef HAVE_LINUX_PERF_EVENT_H */
126 #endif /* _LTTNG_TRACER_CORE_H */