ust-fd: Add close_range declaration
[lttng-ust.git] / liblttng-ust / lttng-tracer-core.h
... / ...
CommitLineData
1#ifndef _LTTNG_TRACER_CORE_H
2#define _LTTNG_TRACER_CORE_H
3
4/*
5 * Copyright (C) 2005-2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 *
7 * This contains the core definitions for the Linux Trace Toolkit.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; version 2.1 of
12 * the License.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24#include <stdint.h>
25#include <stddef.h>
26#include <urcu/arch.h>
27#include <urcu/list.h>
28#include <lttng/ust-tracer.h>
29#include <lttng/bug.h>
30#include <lttng/ringbuffer-config.h>
31#include <usterr-signal-safe.h>
32#include <helper.h>
33
34/*
35 * The longuest possible namespace proc path is with the cgroup ns
36 * and the maximum theoretical linux pid of 536870912 :
37 *
38 * /proc/self/task/536870912/ns/cgroup
39 */
40#define LTTNG_PROC_NS_PATH_MAX 40
41
42struct lttng_session;
43struct lttng_channel;
44struct lttng_event;
45struct lttng_ctx_field;
46struct lttng_ust_lib_ring_buffer_ctx;
47struct lttng_ctx_value;
48
49int ust_lock(void) __attribute__ ((warn_unused_result));
50void ust_lock_nocheck(void);
51void ust_unlock(void);
52
53void lttng_fixup_event_tls(void);
54void lttng_fixup_vtid_tls(void);
55void lttng_fixup_procname_tls(void);
56void lttng_fixup_cgroup_ns_tls(void);
57void lttng_fixup_ipc_ns_tls(void);
58void lttng_fixup_net_ns_tls(void);
59void lttng_fixup_uts_ns_tls(void);
60
61const char *lttng_ust_obj_get_name(int id);
62
63int lttng_get_notify_socket(void *owner);
64
65LTTNG_HIDDEN
66char* lttng_ust_sockinfo_get_procname(void *owner);
67
68void lttng_ust_sockinfo_session_enabled(void *owner);
69
70void lttng_ust_malloc_wrapper_init(void);
71
72ssize_t lttng_ust_read(int fd, void *buf, size_t len);
73
74size_t lttng_ust_dummy_get_size(struct lttng_ctx_field *field, size_t offset);
75void lttng_ust_dummy_record(struct lttng_ctx_field *field,
76 struct lttng_ust_lib_ring_buffer_ctx *ctx,
77 struct lttng_channel *chan);
78void lttng_ust_dummy_get_value(struct lttng_ctx_field *field,
79 struct lttng_ctx_value *value);
80int lttng_context_is_app(const char *name);
81void lttng_ust_fixup_tls(void);
82
83#ifdef LTTNG_UST_HAVE_PERF_EVENT
84void lttng_ust_fixup_perf_counter_tls(void);
85void lttng_perf_lock(void);
86void lttng_perf_unlock(void);
87#else /* #ifdef LTTNG_UST_HAVE_PERF_EVENT */
88static inline
89void lttng_ust_fixup_perf_counter_tls(void)
90{
91}
92static inline
93void lttng_perf_lock(void)
94{
95}
96static inline
97void lttng_perf_unlock(void)
98{
99}
100#endif /* #else #ifdef LTTNG_UST_HAVE_PERF_EVENT */
101
102#endif /* _LTTNG_TRACER_CORE_H */
This page took 0.023319 seconds and 4 git commands to generate.