Tor  0.4.7.0-alpha-dev
lttng.h
Go to the documentation of this file.
1 /* Copyright (c) 2020, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
3 
4 /**
5  * \file lttng.h
6  * \brief Header file for lttng.c.
7  **/
8 
9 #ifndef TOR_TRACE_LTTNG_LTTNG_H
10 #define TOR_TRACE_LTTNG_LTTNG_H
11 
12 #ifdef USE_TRACING_INSTRUMENTATION_LTTNG
13 
14 #include <lttng/tracepoint.h>
15 
16 /* Map event to an LTTng tracepoint. */
17 #define TOR_TRACE_LTTNG(subsystem, event_name, ...) \
18  tracepoint(subsystem, event_name, ## __VA_ARGS__)
19 
20 #else /* !defined(USE_TRACING_INSTRUMENTATION_LTTNG) */
21 
22 /* NOP event. */
23 #define TOR_TRACE_LTTNG(subsystem, event_name, ...)
24 
25 #endif /* !defined(USE_TRACING_INSTRUMENTATION_LTTNG) */
26 
27 #endif /* TOR_TRACE_LTTNG_LTTNG_H */
28