Bitcoin Core  22.99.0
P2P Digital Currency
trace.h
Go to the documentation of this file.
1 // Copyright (c) 2020 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 #ifdef ENABLE_TRACING
9 
10 #include <sys/sdt.h>
11 
12 #define TRACE(context, event) DTRACE_PROBE(context, event)
13 #define TRACE1(context, event, a) DTRACE_PROBE1(context, event, a)
14 #define TRACE2(context, event, a, b) DTRACE_PROBE2(context, event, a, b)
15 #define TRACE3(context, event, a, b, c) DTRACE_PROBE3(context, event, a, b, c)
16 #define TRACE4(context, event, a, b, c, d) DTRACE_PROBE4(context, event, a, b, c, d)
17 #define TRACE5(context, event, a, b, c, d, e) DTRACE_PROBE5(context, event, a, b, c, d, e)
18 #define TRACE6(context, event, a, b, c, d, e, f) DTRACE_PROBE6(context, event, a, b, c, d, e, f)
19 #define TRACE7(context, event, a, b, c, d, e, f, g) DTRACE_PROBE7(context, event, a, b, c, d, e, f, g)
20 #define TRACE8(context, event, a, b, c, d, e, f, g, h) DTRACE_PROBE8(context, event, a, b, c, d, e, f, g, h)
21 #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)
22 #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)
23 #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)
24 #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)
25 
26 #else
27 
28 #define TRACE(context, event)
29 #define TRACE1(context, event, a)
30 #define TRACE2(context, event, a, b)
31 #define TRACE3(context, event, a, b, c)
32 #define TRACE4(context, event, a, b, c, d)
33 #define TRACE5(context, event, a, b, c, d, e)
34 #define TRACE6(context, event, a, b, c, d, e, f)
35 #define TRACE7(context, event, a, b, c, d, e, f, g)
36 #define TRACE8(context, event, a, b, c, d, e, f, g, h)
37 #define TRACE9(context, event, a, b, c, d, e, f, g, h, i)
38 #define TRACE10(context, event, a, b, c, d, e, f, g, h, i, j)
39 #define TRACE11(context, event, a, b, c, d, e, f, g, h, i, j, k)
40 #define TRACE12(context, event, a, b, c, d, e, f, g, h, i, j, k, l)
41 
42 #endif
43 
44 
45 #endif /* BITCOIN_UTIL_TRACE_H */