Tracepoint and TRACEPOINT_EVENT API cleanup
[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>
35
36extern void tracepoint_update_probe_range(struct tracepoint * const *begin,
37 struct tracepoint * const *end);
38
39extern int tracepoint_probe_register_noupdate(const char *name, void *probe,
40 void *data);
41extern int tracepoint_probe_unregister_noupdate(const char *name, void *probe,
42 void *data);
43extern void tracepoint_probe_update_all(void);
44
45struct tracepoint_iter {
46 struct tracepoint_lib *lib;
47 struct tracepoint * const *tracepoint;
48};
49
50extern void tracepoint_iter_start(struct tracepoint_iter *iter);
51extern void tracepoint_iter_next(struct tracepoint_iter *iter);
52extern void tracepoint_iter_stop(struct tracepoint_iter *iter);
53extern void tracepoint_iter_reset(struct tracepoint_iter *iter);
54extern int tracepoint_get_iter_range(struct tracepoint * const **tracepoint,
55 struct tracepoint * const *begin, struct tracepoint * const *end);
56
57/*
58 * tracepoint_synchronize_unregister must be called between the last tracepoint
59 * probe unregistration and the end of module exit to make sure there is no
60 * caller executing a probe when it is freed.
61 */
62static inline void tracepoint_synchronize_unregister(void)
63{
64 synchronize_rcu();
65}
66
67extern void lock_trace_events(void);
68extern void unlock_trace_events(void);
69
70struct trace_event_iter {
71 struct trace_event_lib *lib;
72 struct trace_event * const *trace_event;
73};
74
75extern void trace_event_iter_start(struct trace_event_iter *iter);
76extern void trace_event_iter_next(struct trace_event_iter *iter);
77extern void trace_event_iter_reset(struct trace_event_iter *iter);
78
79extern int trace_event_get_iter_range(struct trace_event * const **trace_event,
80 struct trace_event * const *begin,
81 struct trace_event * const *end);
82
83extern void trace_event_update_process(void);
84extern int is_trace_event_enabled(const char *channel, const char *name);
85
86#endif /* _UST_TRACEPOINT_INTERNAL_H */
This page took 0.024311 seconds and 4 git commands to generate.