mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
merge bitcoin#23724: add systemtap's sys/sdt.h as depends for GUIX builds with USDT tracepoints
This commit is contained in:
parent
6cc596b99a
commit
264e02fcc7
21
configure.ac
21
configure.ac
@ -138,11 +138,11 @@ AC_ARG_WITH([bdb],
|
|||||||
[use_bdb=$withval],
|
[use_bdb=$withval],
|
||||||
[use_bdb=auto])
|
[use_bdb=auto])
|
||||||
|
|
||||||
AC_ARG_ENABLE([ebpf],
|
AC_ARG_ENABLE([usdt],
|
||||||
[AS_HELP_STRING([--enable-ebpf],
|
[AS_HELP_STRING([--enable-usdt],
|
||||||
[enable eBPF tracing (default is yes if sys/sdt.h is found)])],
|
[enable tracepoints for Userspace, Statically Defined Tracing (default is yes if sys/sdt.h is found)])],
|
||||||
[use_ebpf=$enableval],
|
[use_usdt=$enableval],
|
||||||
[use_ebpf=yes])
|
[use_usdt=yes])
|
||||||
|
|
||||||
AC_ARG_WITH([miniupnpc],
|
AC_ARG_WITH([miniupnpc],
|
||||||
[AS_HELP_STRING([--with-miniupnpc],
|
[AS_HELP_STRING([--with-miniupnpc],
|
||||||
@ -1408,15 +1408,15 @@ if test x$enable_wallet != xno; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$use_ebpf != xno; then
|
if test x$use_usdt != xno; then
|
||||||
AC_MSG_CHECKING([whether eBPF tracepoints are supported])
|
AC_MSG_CHECKING([whether Userspace, Statically Defined Tracing tracepoints are supported])
|
||||||
AC_COMPILE_IFELSE([
|
AC_COMPILE_IFELSE([
|
||||||
AC_LANG_PROGRAM(
|
AC_LANG_PROGRAM(
|
||||||
[#include <sys/sdt.h>],
|
[#include <sys/sdt.h>],
|
||||||
[DTRACE_PROBE("context", "event");]
|
[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(yes); AC_DEFINE([ENABLE_TRACING], [1], [Define to 1 to enable tracepoints for Userspace, Statically Defined Tracing])],
|
||||||
[AC_MSG_RESULT(no); have_sdt=no;]
|
[AC_MSG_RESULT(no); use_usdt=no;]
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1795,7 +1795,6 @@ AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
|
|||||||
AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes])
|
AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes])
|
||||||
AM_CONDITIONAL([USE_SQLITE], [test "x$use_sqlite" = "xyes"])
|
AM_CONDITIONAL([USE_SQLITE], [test "x$use_sqlite" = "xyes"])
|
||||||
AM_CONDITIONAL([USE_BDB], [test "x$use_bdb" = "xyes"])
|
AM_CONDITIONAL([USE_BDB], [test "x$use_bdb" = "xyes"])
|
||||||
AM_CONDITIONAL([ENABLE_TRACING],[test x$have_sdt = xyes])
|
|
||||||
AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = xyes])
|
AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = xyes])
|
||||||
AM_CONDITIONAL([ENABLE_FUZZ],[test x$enable_fuzz = xyes])
|
AM_CONDITIONAL([ENABLE_FUZZ],[test x$enable_fuzz = xyes])
|
||||||
AM_CONDITIONAL([ENABLE_FUZZ_BINARY],[test x$enable_fuzz_binary = xyes])
|
AM_CONDITIONAL([ENABLE_FUZZ_BINARY],[test x$enable_fuzz_binary = xyes])
|
||||||
@ -1943,7 +1942,7 @@ echo " with bench = $use_bench"
|
|||||||
echo " with upnp = $use_upnp"
|
echo " with upnp = $use_upnp"
|
||||||
echo " with natpmp = $use_natpmp"
|
echo " with natpmp = $use_natpmp"
|
||||||
echo " use asm = $use_asm"
|
echo " use asm = $use_asm"
|
||||||
echo " ebpf tracing = $have_sdt"
|
echo " USDT tracing = $use_usdt"
|
||||||
echo " sanitizers = $use_sanitizers"
|
echo " sanitizers = $use_sanitizers"
|
||||||
echo " debug enabled = $enable_debug"
|
echo " debug enabled = $enable_debug"
|
||||||
echo " stacktraces enabled = $enable_stacktraces"
|
echo " stacktraces enabled = $enable_stacktraces"
|
||||||
|
@ -39,6 +39,7 @@ NO_SQLITE ?=
|
|||||||
NO_WALLET ?=
|
NO_WALLET ?=
|
||||||
NO_ZMQ ?=
|
NO_ZMQ ?=
|
||||||
NO_UPNP ?=
|
NO_UPNP ?=
|
||||||
|
NO_USDT ?=
|
||||||
NO_NATPMP ?=
|
NO_NATPMP ?=
|
||||||
MULTIPROCESS ?=
|
MULTIPROCESS ?=
|
||||||
FALLBACK_DOWNLOAD_PATH ?= http://dash-depends-sources.s3-website-us-west-2.amazonaws.com
|
FALLBACK_DOWNLOAD_PATH ?= http://dash-depends-sources.s3-website-us-west-2.amazonaws.com
|
||||||
@ -155,8 +156,9 @@ natpmp_packages_$(NO_NATPMP) = $(natpmp_packages)
|
|||||||
|
|
||||||
zmq_packages_$(NO_ZMQ) = $(zmq_packages)
|
zmq_packages_$(NO_ZMQ) = $(zmq_packages)
|
||||||
multiprocess_packages_$(MULTIPROCESS) = $(multiprocess_packages)
|
multiprocess_packages_$(MULTIPROCESS) = $(multiprocess_packages)
|
||||||
|
usdt_packages_$(NO_USDT) = $(usdt_$(host_os)_packages)
|
||||||
|
|
||||||
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_) $(wallet_packages_) $(upnp_packages_) $(natpmp_packages_)
|
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_) $(wallet_packages_) $(upnp_packages_) $(natpmp_packages_) $(usdt_packages_)
|
||||||
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
|
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
|
||||||
|
|
||||||
ifneq ($(zmq_packages_),)
|
ifneq ($(zmq_packages_),)
|
||||||
@ -234,6 +236,7 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
|
|||||||
-e 's|@no_bdb@|$(NO_BDB)|' \
|
-e 's|@no_bdb@|$(NO_BDB)|' \
|
||||||
-e 's|@no_sqlite@|$(NO_SQLITE)|' \
|
-e 's|@no_sqlite@|$(NO_SQLITE)|' \
|
||||||
-e 's|@no_upnp@|$(NO_UPNP)|' \
|
-e 's|@no_upnp@|$(NO_UPNP)|' \
|
||||||
|
-e 's|@no_usdt@|$(NO_USDT)|' \
|
||||||
-e 's|@no_natpmp@|$(NO_NATPMP)|' \
|
-e 's|@no_natpmp@|$(NO_NATPMP)|' \
|
||||||
-e 's|@multiprocess@|$(MULTIPROCESS)|' \
|
-e 's|@multiprocess@|$(MULTIPROCESS)|' \
|
||||||
-e 's|@debug@|$(DEBUG)|' \
|
-e 's|@debug@|$(DEBUG)|' \
|
||||||
|
@ -62,12 +62,16 @@ if test -z "$with_gui" && test -n "@no_qt@"; then
|
|||||||
with_gui=no
|
with_gui=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -n "@debug@" && test -z "@no_qt@" && test "x$with_gui" != xno; then
|
||||||
|
with_gui=qt5_debug
|
||||||
|
fi
|
||||||
|
|
||||||
if test -z "$enable_zmq" && test -n "@no_zmq@"; then
|
if test -z "$enable_zmq" && test -n "@no_zmq@"; then
|
||||||
enable_zmq=no
|
enable_zmq=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "@debug@" && test -z "@no_qt@" && test "x$with_gui" != xno; then
|
if test -z "$enable_usdt" && test -n "@no_usdt@"; then
|
||||||
with_gui=qt5_debug
|
enable_usdt=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "@host_os@" = darwin; then
|
if test "@host_os@" = darwin; then
|
||||||
|
@ -22,6 +22,8 @@ natpmp_packages=libnatpmp
|
|||||||
multiprocess_packages = libmultiprocess capnp
|
multiprocess_packages = libmultiprocess capnp
|
||||||
multiprocess_native_packages = native_libmultiprocess native_capnp
|
multiprocess_native_packages = native_libmultiprocess native_capnp
|
||||||
|
|
||||||
|
usdt_linux_packages=systemtap
|
||||||
|
|
||||||
darwin_native_packages = native_ds_store native_mac_alias
|
darwin_native_packages = native_ds_store native_mac_alias
|
||||||
|
|
||||||
ifneq ($(build_os),darwin)
|
ifneq ($(build_os),darwin)
|
||||||
|
12
depends/packages/systemtap.mk
Normal file
12
depends/packages/systemtap.mk
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package=systemtap
|
||||||
|
$(package)_version=4.5
|
||||||
|
$(package)_download_path=https://sourceware.org/systemtap/ftp/releases/
|
||||||
|
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||||
|
$(package)_sha256_hash=75078ed37e0dd2a769c9d1f9394170b2d9f4d7daa425f43ca80c13bad6cfc925
|
||||||
|
$(package)_patches=remove_SDT_ASM_SECTION_AUTOGROUP_SUPPORT_check.patch
|
||||||
|
|
||||||
|
define $(package)_preprocess_cmds
|
||||||
|
patch -p1 < $($(package)_patch_dir)/remove_SDT_ASM_SECTION_AUTOGROUP_SUPPORT_check.patch && \
|
||||||
|
mkdir -p $($(package)_staging_prefix_dir)/include/sys && \
|
||||||
|
cp includes/sys/sdt.h $($(package)_staging_prefix_dir)/include/sys/sdt.h
|
||||||
|
endef
|
@ -0,0 +1,31 @@
|
|||||||
|
commit b92d4c121486f3c6e8a2cea537c53eb09894479a
|
||||||
|
Author: 0xb10c <0xb10c@gmail.com>
|
||||||
|
Date: Tue Dec 7 11:02:07 2021 +0100
|
||||||
|
|
||||||
|
Remove _SDT_ASM_SECTION_AUTOGROUP_SUPPORT check
|
||||||
|
|
||||||
|
We assume that the assembler supports "?" in .pushsection directives.
|
||||||
|
This enables us to skip configure and make.
|
||||||
|
|
||||||
|
See https://github.com/bitcoin/bitcoin/issues/23297.
|
||||||
|
|
||||||
|
diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h
|
||||||
|
index 97766e710..352b4ee25 100644
|
||||||
|
--- a/includes/sys/sdt.h
|
||||||
|
+++ b/includes/sys/sdt.h
|
||||||
|
@@ -230,12 +230,10 @@ __extension__ extern unsigned long long __sdt_unsp;
|
||||||
|
nice with code in COMDAT sections, which comes up in C++ code.
|
||||||
|
Without that assembler support, some combinations of probe placements
|
||||||
|
in certain kinds of C++ code may produce link-time errors. */
|
||||||
|
-#include "sdt-config.h"
|
||||||
|
-#if _SDT_ASM_SECTION_AUTOGROUP_SUPPORT
|
||||||
|
+/* PATCH: We assume that the assembler supports the feature. This
|
||||||
|
+ enables us to skip configure and make. In turn, this means we
|
||||||
|
+ require fewer dependencies and have shorter depend build times. */
|
||||||
|
# define _SDT_ASM_AUTOGROUP "?"
|
||||||
|
-#else
|
||||||
|
-# define _SDT_ASM_AUTOGROUP ""
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
#define _SDT_ASM_BODY(provider, name, pack_args, args) \
|
||||||
|
_SDT_ASM_1(990: _SDT_NOP) \
|
@ -24,7 +24,7 @@ These are the dependencies currently used by Dash Core. You can find instruction
|
|||||||
| Qt | [5.15.11](https://download.qt.io/official_releases/qt/) | [5.11.3](https://github.com/bitcoin/bitcoin/pull/24132) | No | | |
|
| Qt | [5.15.11](https://download.qt.io/official_releases/qt/) | [5.11.3](https://github.com/bitcoin/bitcoin/pull/24132) | No | | |
|
||||||
| SQLite | [3.32.1](https://sqlite.org/download.html) | [3.7.17](https://github.com/bitcoin/bitcoin/pull/19077) | | | |
|
| SQLite | [3.32.1](https://sqlite.org/download.html) | [3.7.17](https://github.com/bitcoin/bitcoin/pull/19077) | | | |
|
||||||
| XCB | | | | | [Yes](https://github.com/dashpay/dash/blob/develop/depends/packages/qt.mk) (Linux only) |
|
| XCB | | | | | [Yes](https://github.com/dashpay/dash/blob/develop/depends/packages/qt.mk) (Linux only) |
|
||||||
| systemtap ([tracing](tracing.md))| | | | | |
|
| systemtap ([tracing](tracing.md))| [4.5](https://sourceware.org/systemtap/ftp/releases/) | | | | |
|
||||||
| xkbcommon | | | | | [Yes](https://github.com/dashpay/dash/blob/develop/depends/packages/qt.mk) (Linux only) |
|
| xkbcommon | | | | | [Yes](https://github.com/dashpay/dash/blob/develop/depends/packages/qt.mk) (Linux only) |
|
||||||
| ZeroMQ | [4.3.1](https://github.com/zeromq/libzmq/releases) | 4.0.0 | No | | |
|
| ZeroMQ | [4.3.1](https://github.com/zeromq/libzmq/releases) | 4.0.0 | No | | |
|
||||||
| zlib | | | | | [Yes](https://github.com/dashpay/dash/blob/develop/depends/packages/qt.mk) |
|
| zlib | | | | | [Yes](https://github.com/dashpay/dash/blob/develop/depends/packages/qt.mk) |
|
||||||
|
Loading…
Reference in New Issue
Block a user