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