Bitcoin Core 28.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
trace.h
Go to the documentation of this file.
1// Copyright (c) 2020-2021 The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_UTIL_TRACE_H
6#define BITCOIN_UTIL_TRACE_H
7
8#include <config/bitcoin-config.h> // IWYU pragma: keep
9
10#ifdef ENABLE_TRACING
11
12#include <sys/sdt.h>
13
14#define TRACE(context, event) DTRACE_PROBE(context, event)
15#define TRACE1(context, event, a) DTRACE_PROBE1(context, event, a)
16#define TRACE2(context, event, a, b) DTRACE_PROBE2(context, event, a, b)
17#define TRACE3(context, event, a, b, c) DTRACE_PROBE3(context, event, a, b, c)
18#define TRACE4(context, event, a, b, c, d) DTRACE_PROBE4(context, event, a, b, c, d)
19#define TRACE5(context, event, a, b, c, d, e) DTRACE_PROBE5(context, event, a, b, c, d, e)
20#define TRACE6(context, event, a, b, c, d, e, f) DTRACE_PROBE6(context, event, a, b, c, d, e, f)
21#define TRACE7(context, event, a, b, c, d, e, f, g) DTRACE_PROBE7(context, event, a, b, c, d, e, f, g)
22#define TRACE8(context, event, a, b, c, d, e, f, g, h) DTRACE_PROBE8(context, event, a, b, c, d, e, f, g, h)
23#define TRACE9(context, event, a, b, c, d, e, f, g, h, i) DTRACE_PROBE9(context, event, a, b, c, d, e, f, g, h, i)
24#define TRACE10(context, event, a, b, c, d, e, f, g, h, i, j) DTRACE_PROBE10(context, event, a, b, c, d, e, f, g, h, i, j)
25#define TRACE11(context, event, a, b, c, d, e, f, g, h, i, j, k) DTRACE_PROBE11(context, event, a, b, c, d, e, f, g, h, i, j, k)
26#define TRACE12(context, event, a, b, c, d, e, f, g, h, i, j, k, l) DTRACE_PROBE12(context, event, a, b, c, d, e, f, g, h, i, j, k, l)
27
28#else
29
30#define TRACE(context, event)
31#define TRACE1(context, event, a)
32#define TRACE2(context, event, a, b)
33#define TRACE3(context, event, a, b, c)
34#define TRACE4(context, event, a, b, c, d)
35#define TRACE5(context, event, a, b, c, d, e)
36#define TRACE6(context, event, a, b, c, d, e, f)
37#define TRACE7(context, event, a, b, c, d, e, f, g)
38#define TRACE8(context, event, a, b, c, d, e, f, g, h)
39#define TRACE9(context, event, a, b, c, d, e, f, g, h, i)
40#define TRACE10(context, event, a, b, c, d, e, f, g, h, i, j)
41#define TRACE11(context, event, a, b, c, d, e, f, g, h, i, j, k)
42#define TRACE12(context, event, a, b, c, d, e, f, g, h, i, j, k, l)
43
44#endif
45
46
47#endif // BITCOIN_UTIL_TRACE_H