Hide ust_lock private symbols
[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/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
29struct lttng_session;
30struct lttng_channel;
31struct lttng_event;
32struct lttng_ctx_field;
33struct lttng_ust_lib_ring_buffer_ctx;
34struct lttng_ctx_value;
35struct lttng_event_notifier;
36
37LTTNG_HIDDEN
38int ust_lock(void) __attribute__ ((warn_unused_result));
39LTTNG_HIDDEN
40void ust_lock_nocheck(void);
41LTTNG_HIDDEN
42void ust_unlock(void);
43
44void lttng_fixup_event_tls(void);
45void lttng_fixup_vtid_tls(void);
46void lttng_fixup_procname_tls(void);
47void lttng_fixup_cgroup_ns_tls(void);
48void lttng_fixup_ipc_ns_tls(void);
49void lttng_fixup_net_ns_tls(void);
50LTTNG_HIDDEN
51void lttng_fixup_time_ns_tls(void);
52void lttng_fixup_uts_ns_tls(void);
53
54LTTNG_HIDDEN
55void lttng_ust_fixup_fd_tracker_tls(void);
56
57const char *lttng_ust_obj_get_name(int id);
58
59int lttng_get_notify_socket(void *owner);
60
61LTTNG_HIDDEN
62char* lttng_ust_sockinfo_get_procname(void *owner);
63
64void lttng_ust_sockinfo_session_enabled(void *owner);
65
66void lttng_ust_malloc_wrapper_init(void);
67
68ssize_t lttng_ust_read(int fd, void *buf, size_t len);
69
70size_t lttng_ust_dummy_get_size(struct lttng_ctx_field *field, size_t offset);
71void lttng_ust_dummy_record(struct lttng_ctx_field *field,
72 struct lttng_ust_lib_ring_buffer_ctx *ctx,
73 struct lttng_channel *chan);
74void lttng_ust_dummy_get_value(struct lttng_ctx_field *field,
75 struct lttng_ctx_value *value);
76int lttng_context_is_app(const char *name);
77void lttng_ust_fixup_tls(void);
78
79LTTNG_HIDDEN
80void lttng_event_notifier_notification_send(
81 struct lttng_event_notifier *event_notifier,
82 const char *stack_data);
83
84LTTNG_HIDDEN
85struct lttng_counter_transport *lttng_counter_transport_find(const char *name);
86LTTNG_HIDDEN
87void lttng_counter_transport_register(struct lttng_counter_transport *transport);
88LTTNG_HIDDEN
89void lttng_counter_transport_unregister(struct lttng_counter_transport *transport);
90
91#ifdef HAVE_PERF_EVENT
92void lttng_ust_fixup_perf_counter_tls(void);
93void lttng_perf_lock(void);
94void lttng_perf_unlock(void);
95#else /* #ifdef HAVE_PERF_EVENT */
96static inline
97void lttng_ust_fixup_perf_counter_tls(void)
98{
99}
100static inline
101void lttng_perf_lock(void)
102{
103}
104static inline
105void lttng_perf_unlock(void)
106{
107}
108#endif /* #else #ifdef HAVE_PERF_EVENT */
109
110#endif /* _LTTNG_TRACER_CORE_H */
This page took 0.025043 seconds and 4 git commands to generate.