Rename struct lttng_event_notifier to struct lttng_ust_event_notifier
[lttng-ust.git] / liblttng-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/bug.h>
17 #include <lttng/ringbuffer-config.h>
18 #include <usterr-signal-safe.h>
19 #include <ust-helper.h>
20
21 /*
22 * The longuest possible namespace proc path is with the cgroup ns
23 * and the maximum theoretical linux pid of 536870912 :
24 *
25 * /proc/self/task/536870912/ns/cgroup
26 */
27 #define LTTNG_PROC_NS_PATH_MAX 40
28
29 struct lttng_session;
30 struct lttng_channel;
31 struct lttng_event;
32 struct lttng_ctx_field;
33 struct lttng_ust_lib_ring_buffer_ctx;
34 struct lttng_ctx_value;
35 struct lttng_ust_event_notifier;
36
37 LTTNG_HIDDEN
38 int ust_lock(void) __attribute__ ((warn_unused_result));
39 LTTNG_HIDDEN
40 void ust_lock_nocheck(void);
41 LTTNG_HIDDEN
42 void ust_unlock(void);
43
44 LTTNG_HIDDEN
45 void lttng_ust_fixup_tls(void);
46 LTTNG_HIDDEN
47 void lttng_fixup_event_tls(void);
48 LTTNG_HIDDEN
49 void lttng_fixup_vtid_tls(void);
50 LTTNG_HIDDEN
51 void lttng_fixup_procname_tls(void);
52 LTTNG_HIDDEN
53 void lttng_fixup_cgroup_ns_tls(void);
54 LTTNG_HIDDEN
55 void lttng_fixup_ipc_ns_tls(void);
56 LTTNG_HIDDEN
57 void lttng_fixup_net_ns_tls(void);
58 LTTNG_HIDDEN
59 void lttng_fixup_time_ns_tls(void);
60 LTTNG_HIDDEN
61 void lttng_fixup_uts_ns_tls(void);
62
63 LTTNG_HIDDEN
64 void lttng_ust_fixup_fd_tracker_tls(void);
65
66 LTTNG_HIDDEN
67 const char *lttng_ust_obj_get_name(int id);
68
69 LTTNG_HIDDEN
70 int lttng_get_notify_socket(void *owner);
71
72 LTTNG_HIDDEN
73 char* lttng_ust_sockinfo_get_procname(void *owner);
74
75 LTTNG_HIDDEN
76 void lttng_ust_sockinfo_session_enabled(void *owner);
77
78 LTTNG_HIDDEN
79 ssize_t lttng_ust_read(int fd, void *buf, size_t len);
80
81 LTTNG_HIDDEN
82 size_t lttng_ust_dummy_get_size(struct lttng_ctx_field *field, size_t offset);
83 LTTNG_HIDDEN
84 void lttng_ust_dummy_record(struct lttng_ctx_field *field,
85 struct lttng_ust_lib_ring_buffer_ctx *ctx,
86 struct lttng_channel *chan);
87 LTTNG_HIDDEN
88 void lttng_ust_dummy_get_value(struct lttng_ctx_field *field,
89 struct lttng_ctx_value *value);
90
91 LTTNG_HIDDEN
92 void lttng_event_notifier_notification_send(
93 struct lttng_ust_event_notifier *event_notifier,
94 const char *stack_data);
95
96 LTTNG_HIDDEN
97 struct lttng_counter_transport *lttng_counter_transport_find(const char *name);
98 LTTNG_HIDDEN
99 void lttng_counter_transport_register(struct lttng_counter_transport *transport);
100 LTTNG_HIDDEN
101 void lttng_counter_transport_unregister(struct lttng_counter_transport *transport);
102
103 #ifdef HAVE_PERF_EVENT
104 LTTNG_HIDDEN
105 void lttng_ust_fixup_perf_counter_tls(void);
106 LTTNG_HIDDEN
107 void lttng_perf_lock(void);
108 LTTNG_HIDDEN
109 void lttng_perf_unlock(void);
110 #else /* #ifdef HAVE_PERF_EVENT */
111 static inline
112 void lttng_ust_fixup_perf_counter_tls(void)
113 {
114 }
115 static inline
116 void lttng_perf_lock(void)
117 {
118 }
119 static inline
120 void lttng_perf_unlock(void)
121 {
122 }
123 #endif /* #else #ifdef HAVE_PERF_EVENT */
124
125 #endif /* _LTTNG_TRACER_CORE_H */
This page took 0.03218 seconds and 5 git commands to generate.