forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bitcoin#23724: build: add systemtap's sys/sdt.h as depends for …
…GUIX builds with USDT tracepoints 6200fbf build: rename --enable-ebpf to --enable-usdt (0xb10c) e158a2a 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 bitcoin#23297. ACKs for top commit: fanquake: ACK 6200fbf - tested enabling / disabling and with/without SDT from depends. We can follow up with bitcoin#23819, bitcoin#23907 and bitcoin#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
- Loading branch information
Showing
7 changed files
with
64 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
31 changes: 31 additions & 0 deletions
31
depends/patches/systemtap/remove_SDT_ASM_SECTION_AUTOGROUP_SUPPORT_check.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
commit b92d4c121486f3c6e8a2cea537c53eb09894479a | ||
Author: 0xb10c <[email protected]> | ||
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) \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters