2 * SPDX-License-Identifier: MIT
4 * Copyright (C) 2013-2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 #include "common/macros.h"
11 #define TRACEPOINT_CREATE_PROBES
12 #define TRACEPOINT_DEFINE
13 #include "lttng-ust-tracelog-provider.h"
15 #define TRACELOG_CB(level) \
17 void __lttng_ust_vtracelog_##level(const char *file, \
18 int line, const char *func, \
19 const char *fmt, va_list ap) \
20 __attribute__((always_inline, format(printf, 4, 0))); \
23 void __lttng_ust_vtracelog_##level(const char *file, \
24 int line, const char *func, \
25 const char *fmt, va_list ap) \
28 const int len = vasprintf(&msg, fmt, ap); \
30 /* len does not include the final \0 */ \
33 lttng_ust_tracepoint_cb_lttng_ust_tracelog___##level(file, \
34 line, func, msg, len, \
35 LTTNG_UST_CALLER_IP()); \
41 void _lttng_ust_vtracelog_##level(const char *file, \
42 int line, const char *func, \
43 const char *fmt, va_list ap) \
44 __attribute__ ((format(printf, 4, 0))); \
46 void _lttng_ust_vtracelog_##level(const char *file, \
47 int line, const char *func, \
48 const char *fmt, va_list ap); \
49 void _lttng_ust_vtracelog_##level(const char *file, \
50 int line, const char *func, \
51 const char *fmt, va_list ap) \
53 __lttng_ust_vtracelog_##level(file, line, func, fmt, ap); \
56 void _lttng_ust_tracelog_##level(const char *file, \
57 int line, const char *func, \
58 const char *fmt, ...) \
59 __attribute__ ((format(printf, 4, 5))); \
61 void _lttng_ust_tracelog_##level(const char *file, \
62 int line, const char *func, \
63 const char *fmt, ...); \
64 void _lttng_ust_tracelog_##level(const char *file, \
65 int line, const char *func, \
66 const char *fmt, ...) \
71 __lttng_ust_vtracelog_##level(file, line, func, fmt, ap); \
75 TRACELOG_CB(TRACE_EMERG
)
76 TRACELOG_CB(TRACE_ALERT
)
77 TRACELOG_CB(TRACE_CRIT
)
78 TRACELOG_CB(TRACE_ERR
)
79 TRACELOG_CB(TRACE_WARNING
)
80 TRACELOG_CB(TRACE_NOTICE
)
81 TRACELOG_CB(TRACE_INFO
)
82 TRACELOG_CB(TRACE_DEBUG_SYSTEM
)
83 TRACELOG_CB(TRACE_DEBUG_PROGRAM
)
84 TRACELOG_CB(TRACE_DEBUG_PROCESS
)
85 TRACELOG_CB(TRACE_DEBUG_MODULE
)
86 TRACELOG_CB(TRACE_DEBUG_UNIT
)
87 TRACELOG_CB(TRACE_DEBUG_FUNCTION
)
88 TRACELOG_CB(TRACE_DEBUG_LINE
)
89 TRACELOG_CB(TRACE_DEBUG
)
This page took 0.031596 seconds and 4 git commands to generate.