From 6060d31e5af50a937dc8bd317a9319b9b649b8af Mon Sep 17 00:00:00 2001 From: Matthias Heiden Date: Thu, 4 Jun 2026 15:32:34 +0200 Subject: [PATCH 1/4] chore: bump samply --- Cargo.lock | 24 ++++++++++++------------ Cargo.toml | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 72cd1406..6d90c144 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1402,7 +1402,7 @@ dependencies = [ [[package]] name = "fxprof-processed-profile" version = "0.8.1" -source = "git+https://github.com/CodSpeedHQ/samply-codspeed?rev=e8b8dacc042978953a6db9616c72846f7b8d5062#e8b8dacc042978953a6db9616c72846f7b8d5062" +source = "git+https://github.com/CodSpeedHQ/samply-codspeed?rev=ec97a70c0667098f8607f30a607ddd031a15a8b8#ec97a70c0667098f8607f30a607ddd031a15a8b8" dependencies = [ "bitflags 2.11.1", "debugid", @@ -1802,7 +1802,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.3", + "socket2 0.5.10", "system-configuration 0.7.0", "tokio", "tower-service", @@ -3252,7 +3252,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" dependencies = [ "anyhow", - "itertools 0.14.0", + "itertools 0.13.0", "proc-macro2", "quote", "syn 2.0.117", @@ -3286,7 +3286,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2 0.6.3", + "socket2 0.5.10", "thiserror 2.0.18", "tokio", "tracing", @@ -3324,7 +3324,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.3", + "socket2 0.5.10", "tracing", "windows-sys 0.60.2", ] @@ -4077,7 +4077,7 @@ dependencies = [ [[package]] name = "samply" version = "0.13.1" -source = "git+https://github.com/CodSpeedHQ/samply-codspeed?rev=e8b8dacc042978953a6db9616c72846f7b8d5062#e8b8dacc042978953a6db9616c72846f7b8d5062" +source = "git+https://github.com/CodSpeedHQ/samply-codspeed?rev=ec97a70c0667098f8607f30a607ddd031a15a8b8#ec97a70c0667098f8607f30a607ddd031a15a8b8" dependencies = [ "bitflags 2.11.1", "byteorder", @@ -4146,7 +4146,7 @@ dependencies = [ [[package]] name = "samply-api" version = "0.24.0" -source = "git+https://github.com/CodSpeedHQ/samply-codspeed?rev=e8b8dacc042978953a6db9616c72846f7b8d5062#e8b8dacc042978953a6db9616c72846f7b8d5062" +source = "git+https://github.com/CodSpeedHQ/samply-codspeed?rev=ec97a70c0667098f8607f30a607ddd031a15a8b8#ec97a70c0667098f8607f30a607ddd031a15a8b8" dependencies = [ "samply-debugid", "samply-symbols", @@ -4162,7 +4162,7 @@ dependencies = [ [[package]] name = "samply-debugid" version = "0.1.0" -source = "git+https://github.com/CodSpeedHQ/samply-codspeed?rev=e8b8dacc042978953a6db9616c72846f7b8d5062#e8b8dacc042978953a6db9616c72846f7b8d5062" +source = "git+https://github.com/CodSpeedHQ/samply-codspeed?rev=ec97a70c0667098f8607f30a607ddd031a15a8b8#ec97a70c0667098f8607f30a607ddd031a15a8b8" dependencies = [ "debugid", "uuid", @@ -4171,7 +4171,7 @@ dependencies = [ [[package]] name = "samply-object" version = "0.1.0" -source = "git+https://github.com/CodSpeedHQ/samply-codspeed?rev=e8b8dacc042978953a6db9616c72846f7b8d5062#e8b8dacc042978953a6db9616c72846f7b8d5062" +source = "git+https://github.com/CodSpeedHQ/samply-codspeed?rev=ec97a70c0667098f8607f30a607ddd031a15a8b8#ec97a70c0667098f8607f30a607ddd031a15a8b8" dependencies = [ "debugid", "object", @@ -4182,7 +4182,7 @@ dependencies = [ [[package]] name = "samply-quota-manager" version = "0.1.0" -source = "git+https://github.com/CodSpeedHQ/samply-codspeed?rev=e8b8dacc042978953a6db9616c72846f7b8d5062#e8b8dacc042978953a6db9616c72846f7b8d5062" +source = "git+https://github.com/CodSpeedHQ/samply-codspeed?rev=ec97a70c0667098f8607f30a607ddd031a15a8b8#ec97a70c0667098f8607f30a607ddd031a15a8b8" dependencies = [ "bytesize", "futures", @@ -4196,7 +4196,7 @@ dependencies = [ [[package]] name = "samply-symbols" version = "0.24.1" -source = "git+https://github.com/CodSpeedHQ/samply-codspeed?rev=e8b8dacc042978953a6db9616c72846f7b8d5062#e8b8dacc042978953a6db9616c72846f7b8d5062" +source = "git+https://github.com/CodSpeedHQ/samply-codspeed?rev=ec97a70c0667098f8607f30a607ddd031a15a8b8#ec97a70c0667098f8607f30a607ddd031a15a8b8" dependencies = [ "addr2line", "bitflags 2.11.1", @@ -5627,7 +5627,7 @@ dependencies = [ [[package]] name = "wholesym" version = "0.8.1" -source = "git+https://github.com/CodSpeedHQ/samply-codspeed?rev=e8b8dacc042978953a6db9616c72846f7b8d5062#e8b8dacc042978953a6db9616c72846f7b8d5062" +source = "git+https://github.com/CodSpeedHQ/samply-codspeed?rev=ec97a70c0667098f8607f30a607ddd031a15a8b8#ec97a70c0667098f8607f30a607ddd031a15a8b8" dependencies = [ "bytes", "core-foundation 0.10.1", diff --git a/Cargo.toml b/Cargo.toml index 4c101686..47e374d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -69,7 +69,7 @@ rmp-serde = "1.3.1" uuid = { version = "1.23.1", features = ["v4"] } which = "8.0.2" crc32fast = "1.5.0" -samply = { git = "https://github.com/CodSpeedHQ/samply-codspeed", rev = "e8b8dacc042978953a6db9616c72846f7b8d5062" } +samply = { git = "https://github.com/CodSpeedHQ/samply-codspeed", rev = "ec97a70c0667098f8607f30a607ddd031a15a8b8" } [target.'cfg(target_os = "linux")'.dependencies] procfs = "0.18" From 78a93610fc983f4d03f329b1789d0276ca7995db Mon Sep 17 00:00:00 2001 From: Matthias Heiden Date: Thu, 4 Jun 2026 15:32:36 +0200 Subject: [PATCH 2/4] feat(node): restore DYLD_INSERT_LIBRARIES from SAMPLY_ alias macOS SIP strips DYLD_* across system-binary execs, dropping samply's preload from the subtree. samply now exposes the value under a SAMPLY_-prefixed name that SIP doesn't strip; restore it in the node.sh introspection shim so the profiler's preload re-arms in the real node. --- src/executor/helpers/introspected_nodejs/node.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/executor/helpers/introspected_nodejs/node.sh b/src/executor/helpers/introspected_nodejs/node.sh index 7292de58..6f8bb312 100644 --- a/src/executor/helpers/introspected_nodejs/node.sh +++ b/src/executor/helpers/introspected_nodejs/node.sh @@ -15,6 +15,14 @@ function echo_debug { # to avoid setting the variable for the children processes, unset it before running the node command unset __CODSPEED_NODE_CORE_INTROSPECTION_PATH__ +# macOS SIP strips DYLD_* across system-binary execs (/usr/bin/env, /bin/sh, …), +# which removes samply's injection library from this subtree. samply also exposes +# the value under a SAMPLY_-prefixed name that SIP does NOT strip; restore it +# here so the profiler's preload re-arms in the real node process. +if [ -n "${SAMPLY_DYLD_INSERT_LIBRARIES:-}" ]; then + export DYLD_INSERT_LIBRARIES="$SAMPLY_DYLD_INSERT_LIBRARIES" +fi + # Retrieve the original path by removing the folder containing codspeed_introspected_node from the path. ORIGINAL_PATH=$(echo "$PATH" | tr ":" "\n" | grep -v "codspeed_introspected_node" | tr "\n" ":") # Check if node is in the original path. From 248a6b25e5a6b4f61500c9ba3c93f7c8bba258a3 Mon Sep 17 00:00:00 2001 From: Matthias Heiden Date: Thu, 4 Jun 2026 15:32:38 +0200 Subject: [PATCH 3/4] feat(go): restore DYLD_INSERT_LIBRARIES from SAMPLY_ alias macOS SIP strips DYLD_* across system-binary execs, dropping samply's preload from the subtree. samply now exposes the value under a SAMPLY_-prefixed name that SIP doesn't strip; restore it in the go.sh introspection shim so the profiler's preload re-arms in the real go. --- src/executor/helpers/introspected_golang/go.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/executor/helpers/introspected_golang/go.sh b/src/executor/helpers/introspected_golang/go.sh index 8c1bef44..ab12361d 100755 --- a/src/executor/helpers/introspected_golang/go.sh +++ b/src/executor/helpers/introspected_golang/go.sh @@ -85,6 +85,14 @@ if [ "${CODSPEED_RUNNER_MODE:-}" != "walltime" ]; then exit 1 fi +# macOS SIP strips DYLD_* across system-binary execs (/usr/bin/env, /bin/sh, …), +# which removes samply's injection library from this subtree. samply also exposes +# the value under a SAMPLY_-prefixed name that SIP does NOT strip; restore it +# here so the profiler's preload re-arms in the real go process. +if [ -n "${SAMPLY_DYLD_INSERT_LIBRARIES:-}" ]; then + export DYLD_INSERT_LIBRARIES="$SAMPLY_DYLD_INSERT_LIBRARIES" +fi + # Find the real go binary by removing our directory from PATH (same approach as node.sh) ORIGINAL_PATH=$(echo "$PATH" | tr ":" "\n" | grep -v "codspeed_introspected_go" | tr "\n" ":") REAL_GO=$(env PATH="$ORIGINAL_PATH" which go 2>/dev/null || true) From 252f8ef2e021272232d8c9a55e9d373e9283935b Mon Sep 17 00:00:00 2001 From: not-matthias Date: Thu, 4 Jun 2026 19:11:37 +0200 Subject: [PATCH 4/4] ref(node): enable set -u to match go.sh --- src/executor/helpers/introspected_nodejs/node.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/executor/helpers/introspected_nodejs/node.sh b/src/executor/helpers/introspected_nodejs/node.sh index 6f8bb312..c64bf500 100644 --- a/src/executor/helpers/introspected_nodejs/node.sh +++ b/src/executor/helpers/introspected_nodejs/node.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -eo pipefail +set -euo pipefail # Custom script to replace node and run with V8 flags that make the execution of the # benchmarks more predictable. @@ -7,7 +7,7 @@ set -eo pipefail # a custom bash function to echo debug messages only if CODSPEED_DEBUG is set to true function echo_debug { - if [ "$CODSPEED_DEBUG" = "true" ]; then + if [ "${CODSPEED_DEBUG:-}" = "true" ]; then echo "::debug::" "$@" fi }