lttng_ust_init_thread: initialise cached context values
[lttng-ust.git] / src / lib / lttng-ust / lttng-tracer-core.h
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/ust-ringbuffer-context.h>
17 #include "common/logging.h"
18
19 enum lttng_ust_init_thread_flags {
20 LTTNG_UST_INIT_THREAD_CONTEXT_CACHE = (1 << 0),
21 LTTNG_UST_INIT_THREAD_MASK = (LTTNG_UST_INIT_THREAD_CONTEXT_CACHE << 1) - 1,
22 };
23
24 struct lttng_ust_session;
25 struct lttng_ust_channel_buffer;
26 struct lttng_ust_ctx_field;
27 struct lttng_ust_ring_buffer_ctx;
28 struct lttng_ust_ctx_value;
29 struct lttng_ust_event_recorder;
30 struct lttng_ust_event_notifier;
31 struct lttng_ust_notification_ctx;
32
33 int ust_lock(void) __attribute__ ((warn_unused_result))
34 __attribute__((visibility("hidden")));
35
36 void ust_lock_nocheck(void)
37 __attribute__((visibility("hidden")));
38
39 void ust_unlock(void)
40 __attribute__((visibility("hidden")));
41
42 void lttng_ust_common_init_thread(int flags)
43 __attribute__((visibility("hidden")));
44
45 void lttng_ust_vtid_init_thread(int flags)
46 __attribute__((visibility("hidden")));
47
48 void lttng_ust_procname_init_thread(int flags)
49 __attribute__((visibility("hidden")));
50
51 void lttng_ust_cgroup_ns_init_thread(int flags)
52 __attribute__((visibility("hidden")));
53
54 void lttng_ust_ipc_ns_init_thread(int flags)
55 __attribute__((visibility("hidden")));
56
57 void lttng_ust_net_ns_init_thread(int flags)
58 __attribute__((visibility("hidden")));
59
60 void lttng_ust_time_ns_init_thread(int flags)
61 __attribute__((visibility("hidden")));
62
63 void lttng_ust_uts_ns_init_thread(int flags)
64 __attribute__((visibility("hidden")));
65
66 const char *lttng_ust_obj_get_name(int id)
67 __attribute__((visibility("hidden")));
68
69 int lttng_get_notify_socket(void *owner)
70 __attribute__((visibility("hidden")));
71
72 char* lttng_ust_sockinfo_get_procname(void *owner)
73 __attribute__((visibility("hidden")));
74
75 void lttng_ust_sockinfo_session_enabled(void *owner)
76 __attribute__((visibility("hidden")));
77
78 void lttng_event_notifier_notification_send(
79 const struct lttng_ust_event_notifier *event_notifier,
80 const char *stack_data,
81 struct lttng_ust_probe_ctx *probe_ctx,
82 struct lttng_ust_notification_ctx *notif_ctx)
83 __attribute__((visibility("hidden")));
84
85 #ifdef HAVE_LINUX_PERF_EVENT_H
86 void lttng_ust_perf_counter_init_thread(int flags)
87 __attribute__((visibility("hidden")));
88
89 void lttng_perf_lock(void)
90 __attribute__((visibility("hidden")));
91
92 void lttng_perf_unlock(void)
93 __attribute__((visibility("hidden")));
94 #else /* #ifdef HAVE_LINUX_PERF_EVENT_H */
95 static inline
96 void lttng_ust_perf_counter_init_thread(int flags __attribute__((unused)))
97 {
98 }
99 static inline
100 void lttng_perf_lock(void)
101 {
102 }
103 static inline
104 void lttng_perf_unlock(void)
105 {
106 }
107 #endif /* #else #ifdef HAVE_LINUX_PERF_EVENT_H */
108
109 #endif /* _LTTNG_TRACER_CORE_H */
This page took 0.031401 seconds and 4 git commands to generate.