Add lttng_ust_ prefix before objd_unref
[lttng-ust.git] / include / ust / tracepoint-internal.h
CommitLineData
81614639
MD
1#ifndef _UST_TRACEPOINT_INTERNAL_H
2#define _UST_TRACEPOINT_INTERNAL_H
3
4/*
5 * tracepoint-internal.h
6 *
7 * Tracepoint internal header.
8 *
9 * Copyright (C) 2008 Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
10 * Copyright (C) 2009 Pierre-Marc Fournier
11 * Copyright (C) 2009 Steven Rostedt <rostedt@goodmis.org>
12 *
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Lesser General Public
15 * License as published by the Free Software Foundation;
16 * version 2.1 of the License.
17 *
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Lesser General Public License for more details.
22 *
23 * You should have received a copy of the GNU Lesser General Public
24 * License along with this library; if not, write to the Free Software
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26 *
27 * Heavily inspired from the Linux Kernel Markers.
28 *
29 * Ported to userspace by Pierre-Marc Fournier.
30 */
31
32#include <urcu-bp.h>
33#include <ust/core.h>
34#include <urcu/list.h>
535b0d0a 35#include <ust/tracepoint.h>
81614639 36
1fcf7ad7
MD
37struct tracepoint_lib {
38 struct tracepoint * const *tracepoints_start;
39 int tracepoints_count;
40 struct cds_list_head list;
41};
42
81614639
MD
43extern int tracepoint_probe_register_noupdate(const char *name, void *probe,
44 void *data);
45extern int tracepoint_probe_unregister_noupdate(const char *name, void *probe,
46 void *data);
47extern void tracepoint_probe_update_all(void);
48
49struct tracepoint_iter {
50 struct tracepoint_lib *lib;
51 struct tracepoint * const *tracepoint;
52};
53
54extern void tracepoint_iter_start(struct tracepoint_iter *iter);
55extern void tracepoint_iter_next(struct tracepoint_iter *iter);
56extern void tracepoint_iter_stop(struct tracepoint_iter *iter);
57extern void tracepoint_iter_reset(struct tracepoint_iter *iter);
58extern int tracepoint_get_iter_range(struct tracepoint * const **tracepoint,
59 struct tracepoint * const *begin, struct tracepoint * const *end);
60
61/*
62 * tracepoint_synchronize_unregister must be called between the last tracepoint
63 * probe unregistration and the end of module exit to make sure there is no
64 * caller executing a probe when it is freed.
65 */
66static inline void tracepoint_synchronize_unregister(void)
67{
68 synchronize_rcu();
69}
70
81614639
MD
71struct trace_event_iter {
72 struct trace_event_lib *lib;
73 struct trace_event * const *trace_event;
74};
75
76extern void trace_event_iter_start(struct trace_event_iter *iter);
77extern void trace_event_iter_next(struct trace_event_iter *iter);
c7292295 78extern void trace_event_iter_stop(struct trace_event_iter *iter);
81614639
MD
79extern void trace_event_iter_reset(struct trace_event_iter *iter);
80
81614639
MD
81extern void trace_event_update_process(void);
82extern int is_trace_event_enabled(const char *channel, const char *name);
83
b27f8e75 84extern void init_tracepoint(void);
edaa1431 85extern void exit_tracepoint(void);
b27f8e75 86
81614639 87#endif /* _UST_TRACEPOINT_INTERNAL_H */
This page took 0.026485 seconds and 4 git commands to generate.