2021-12-30 19:36:57 +02:00
|
|
|
// Copyright (c) 2020-2021 The Bitcoin Core developers
|
2020-05-20 13:35:27 -07:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
|
|
|
#ifndef BITCOIN_UTIL_TRACE_H
|
|
|
|
#define BITCOIN_UTIL_TRACE_H
|
|
|
|
|
2024-02-26 13:36:30 +01:00
|
|
|
#include <config/bitcoin-config.h> // IWYU pragma: keep
|
2023-10-20 14:15:52 +01:00
|
|
|
|
2020-05-20 13:35:27 -07:00
|
|
|
#ifdef ENABLE_TRACING
|
|
|
|
|
|
|
|
#include <sys/sdt.h>
|
|
|
|
|
2023-08-27 10:39:02 +02:00
|
|
|
#define TRACE(context, event) DTRACE_PROBE(context, event)
|
|
|
|
#define TRACE1(context, event, a) DTRACE_PROBE1(context, event, a)
|
|
|
|
#define TRACE2(context, event, a, b) DTRACE_PROBE2(context, event, a, b)
|
|
|
|
#define TRACE3(context, event, a, b, c) DTRACE_PROBE3(context, event, a, b, c)
|
|
|
|
#define TRACE4(context, event, a, b, c, d) DTRACE_PROBE4(context, event, a, b, c, d)
|
|
|
|
#define TRACE5(context, event, a, b, c, d, e) DTRACE_PROBE5(context, event, a, b, c, d, e)
|
|
|
|
#define TRACE6(context, event, a, b, c, d, e, f) DTRACE_PROBE6(context, event, a, b, c, d, e, f)
|
|
|
|
#define TRACE7(context, event, a, b, c, d, e, f, g) DTRACE_PROBE7(context, event, a, b, c, d, e, f, g)
|
|
|
|
#define TRACE8(context, event, a, b, c, d, e, f, g, h) DTRACE_PROBE8(context, event, a, b, c, d, e, f, g, h)
|
|
|
|
#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)
|
|
|
|
#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)
|
|
|
|
#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)
|
|
|
|
#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)
|
2020-05-20 13:35:27 -07:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define TRACE(context, event)
|
|
|
|
#define TRACE1(context, event, a)
|
|
|
|
#define TRACE2(context, event, a, b)
|
|
|
|
#define TRACE3(context, event, a, b, c)
|
|
|
|
#define TRACE4(context, event, a, b, c, d)
|
|
|
|
#define TRACE5(context, event, a, b, c, d, e)
|
|
|
|
#define TRACE6(context, event, a, b, c, d, e, f)
|
|
|
|
#define TRACE7(context, event, a, b, c, d, e, f, g)
|
|
|
|
#define TRACE8(context, event, a, b, c, d, e, f, g, h)
|
|
|
|
#define TRACE9(context, event, a, b, c, d, e, f, g, h, i)
|
|
|
|
#define TRACE10(context, event, a, b, c, d, e, f, g, h, i, j)
|
|
|
|
#define TRACE11(context, event, a, b, c, d, e, f, g, h, i, j, k)
|
|
|
|
#define TRACE12(context, event, a, b, c, d, e, f, g, h, i, j, k, l)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2021-11-12 11:19:44 +01:00
|
|
|
#endif // BITCOIN_UTIL_TRACE_H
|