Namespace RING_BUFFER_ALIGN macros
[lttng-ust.git] / include / lttng / tracef.h
1 /*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (C) 2013-2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 */
6
7 #ifndef _LTTNG_UST_TRACEF_H
8 #define _LTTNG_UST_TRACEF_H
9
10 #include <lttng/tp/lttng-ust-tracef.h>
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 extern
17 void _lttng_ust_tracef(const char *fmt, ...);
18
19 extern
20 void _lttng_ust_vtracef(const char *fmt, va_list ap);
21
22 #define tracef(fmt, ...) \
23 do { \
24 LTTNG_STAP_PROBEV(tracepoint_lttng_ust_tracef, event, ## __VA_ARGS__); \
25 if (caa_unlikely(__tracepoint_lttng_ust_tracef___event.state)) \
26 _lttng_ust_tracef(fmt, ## __VA_ARGS__); \
27 } while (0)
28
29 #define vtracef(fmt, ap) \
30 do { \
31 if (caa_unlikely(__tracepoint_lttng_ust_tracef___event.state)) \
32 _lttng_ust_vtracef(fmt, ap); \
33 } while (0)
34 #ifdef __cplusplus
35 }
36 #endif
37
38 #endif /* _LTTNG_UST_TRACEF_H */
This page took 0.093851 seconds and 4 git commands to generate.