aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-01-10 10:57:55 +0800
committerfanquake <fanquake@gmail.com>2022-01-10 10:59:52 +0800
commit542e405a8517e50bf6687a02af69117931234fde (patch)
treed2e232a9e8d4c964ea3fb8a71c24cc9611cd8f7d /configure.ac
parent2e01b6986099715afa40ed6464da4b321b630e9c (diff)
parent6200fbf54fa919899d99f1cdd5ef88ec8b074cd6 (diff)
downloadbitcoin-542e405a8517e50bf6687a02af69117931234fde.tar.xz
Merge bitcoin/bitcoin#23724: build: add systemtap's sys/sdt.h as depends for GUIX builds with USDT tracepoints
6200fbf54fa919899d99f1cdd5ef88ec8b074cd6 build: rename --enable-ebpf to --enable-usdt (0xb10c) e158a2a7aa501da635cb34414abd0c092216e5f4 build: add systemtap's sys/sdt.h as depends (0xb10c) Pull request description: There has been light conceptual agreement on including the Userspace, Statically Defined Tracing tracepoints in Bitcoin Core release builds. This, for example, enables user to hook into production deployments, if they need to. Binaries don't have to be switched out. This is possible because we don't do [expensive computations](https://github.com/bitcoin/bitcoin/blob/master/doc/tracing.md#no-expensive-computations-for-tracepoints) only needed for the tracepoints. The tracepoints are NOPs when not used. Systemtap's `sys/sdt.h` header is required to build Bitcoin Core with USDT support. The header file defines the `DTRACE_PROBE` macros used in [`src/util/trace.h`](https://github.com/bitcoin/bitcoin/blob/master/src/util/trace.h). This PR adds Systemtap 4.5 (May 2021) as dependency. GUIX builds for Linux hosts now include the tracepoints. Closes https://github.com/bitcoin/bitcoin/issues/23297. ACKs for top commit: fanquake: ACK 6200fbf54fa919899d99f1cdd5ef88ec8b074cd6 - tested enabling / disabling and with/without SDT from depends. We can follow up with #23819, #23907 and #23296, and if any serious issues arise before feature freeze, it is easy for us to flip depends such that USDT becomes opt-in, rather than opt-out, and thus, releases would be tracepoint free. Tree-SHA512: 0263f44892bf8450e8a593e4de7a498243687f8d81269e1c3283fa8354922c7cf93fddef4b92cf5192d33798424aa5812e03e68ef8de31af078a32dd34021382
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 10 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index acddd06569..9b080eb0c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,11 +137,11 @@ AC_ARG_WITH([bdb],
[use_bdb=$withval],
[use_bdb=auto])
-AC_ARG_ENABLE([ebpf],
- [AS_HELP_STRING([--enable-ebpf],
- [enable eBPF tracing (default is yes if sys/sdt.h is found)])],
- [use_ebpf=$enableval],
- [use_ebpf=yes])
+AC_ARG_ENABLE([usdt],
+ [AS_HELP_STRING([--enable-usdt],
+ [enable tracepoints for Userspace, Statically Defined Tracing (default is yes if sys/sdt.h is found)])],
+ [use_usdt=$enableval],
+ [use_usdt=yes])
AC_ARG_WITH([miniupnpc],
[AS_HELP_STRING([--with-miniupnpc],
@@ -1337,15 +1337,15 @@ if test "$enable_wallet" != "no"; then
fi
fi
-if test "$use_ebpf" != "no"; then
- AC_MSG_CHECKING([whether eBPF tracepoints are supported])
+if test "$use_usdt" != "no"; then
+ AC_MSG_CHECKING([whether Userspace, Statically Defined Tracing tracepoints are supported])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM(
[#include <sys/sdt.h>],
[DTRACE_PROBE("context", "event");]
)],
- [AC_MSG_RESULT([yes]); have_sdt=yes; AC_DEFINE([ENABLE_TRACING], [1], [Define to 1 to enable eBPF user static defined tracepoints])],
- [AC_MSG_RESULT([no]); have_sdt=no;]
+ [AC_MSG_RESULT([yes]); AC_DEFINE([ENABLE_TRACING], [1], [Define to 1 to enable tracepoints for Userspace, Statically Defined Tracing])],
+ [AC_MSG_RESULT([no]); use_usdt=no;]
)
fi
@@ -1759,7 +1759,6 @@ AM_CONDITIONAL([TARGET_WINDOWS], [test "$TARGET_OS" = "windows"])
AM_CONDITIONAL([ENABLE_WALLET], [test "$enable_wallet" = "yes"])
AM_CONDITIONAL([USE_SQLITE], [test "$use_sqlite" = "yes"])
AM_CONDITIONAL([USE_BDB], [test "$use_bdb" = "yes"])
-AM_CONDITIONAL([ENABLE_TRACING], [test "$have_sdt" = "yes"])
AM_CONDITIONAL([ENABLE_TESTS], [test "$BUILD_TEST" = "yes"])
AM_CONDITIONAL([ENABLE_FUZZ], [test "$enable_fuzz" = "yes"])
AM_CONDITIONAL([ENABLE_FUZZ_BINARY], [test "$enable_fuzz_binary" = "yes"])
@@ -1929,7 +1928,7 @@ echo " with bench = $use_bench"
echo " with upnp = $use_upnp"
echo " with natpmp = $use_natpmp"
echo " use asm = $use_asm"
-echo " ebpf tracing = $have_sdt"
+echo " USDT tracing = $use_usdt"
echo " sanitizers = $use_sanitizers"
echo " debug enabled = $enable_debug"
echo " gprof enabled = $enable_gprof"