]> git.proxmox.com Git - mirror_frr.git/blob - lib/trace.h
lib, configure.ac: initial LTTng support
[mirror_frr.git] / lib / trace.h
1 /* Tracing
2 *
3 * Copyright (C) 2020 NVIDIA Corporation
4 * Quentin Young
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #if !defined(_TRACE_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
22 #define _TRACE_H
23
24 #ifdef HAVE_CONFIG_H
25 #include "config.h"
26 #endif /* HAVE_CONFIG_H */
27
28 #ifdef HAVE_LTTNG
29
30 #undef TRACEPOINT_PROVIDER
31 #define TRACEPOINT_PROVIDER frr_libfrr
32
33 #undef TRACEPOINT_INCLUDE
34 #define TRACEPOINT_INCLUDE "./trace.h"
35
36 /* tracepoint definitions go here */
37
38 #include <lttng/tracepoint.h>
39 #include <lttng/tracepoint-event.h>
40
41 #else /* HAVE_LTTNG */
42
43 #define tracepoint(...)
44 #define tracef(...)
45 #define tracelog(...)
46 #define tracepoint_enabled(...) true
47
48 #endif /* HAVE_LTTNG */
49
50 #endif /* _TRACE_H */