From a187704b192ba7fad83ef599663d4b2c4b9be98c Mon Sep 17 00:00:00 2001 From: not-matthias Date: Wed, 20 May 2026 18:29:17 +0200 Subject: [PATCH 1/5] chore: bump instrument-hooks to d83209f for macos support --- go-runner/src/runner/overlay/instrument_hooks.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-runner/src/runner/overlay/instrument_hooks.rs b/go-runner/src/runner/overlay/instrument_hooks.rs index acf6a55..a2c8de5 100644 --- a/go-runner/src/runner/overlay/instrument_hooks.rs +++ b/go-runner/src/runner/overlay/instrument_hooks.rs @@ -6,7 +6,7 @@ use tar::Archive; use tempfile::TempDir; const INSTRUMENT_HOOKS_REPO: &str = "CodSpeedHQ/instrument-hooks"; -const INSTRUMENT_HOOKS_COMMIT: &str = "ecdf31a3afd0fb879823e40df65129ec823d374b"; +const INSTRUMENT_HOOKS_COMMIT: &str = "d83209f91683cf4c1677bdde28e0e43ca201f6ed"; /// Get the instrument-hooks directory, downloading if necessary /// Downloads to /tmp/codspeed-instrument-hooks-{commit}/ From 4378ce8b36096392de18d192f4d36fe7db7ab31a Mon Sep 17 00:00:00 2001 From: not-matthias Date: Wed, 20 May 2026 18:37:13 +0200 Subject: [PATCH 2/5] test: add darwin-only fibonacci benchmark for flamegraph testing --- example/fib_darwin_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 example/fib_darwin_test.go diff --git a/example/fib_darwin_test.go b/example/fib_darwin_test.go new file mode 100644 index 0000000..4110f24 --- /dev/null +++ b/example/fib_darwin_test.go @@ -0,0 +1,11 @@ +//go:build darwin + +package example + +import "testing" + +func BenchmarkFibonacciDarwin(b *testing.B) { + for b.Loop() { + fibonacci(25) + } +} From 29ca40d5609abf75fac74a75b49941990c3b3d01 Mon Sep 17 00:00:00 2001 From: not-matthias Date: Fri, 22 May 2026 13:57:23 +0200 Subject: [PATCH 3/5] fix(macos): strip DWARF debug info to avoid dsymutil OOM Go 1.26+ invokes dsymutil on macOS to extract DWARF into a .dSYM bundle, which can be OOM-killed on large cgo binaries. Walltime mode doesn't need DWARF symbols, so disable them on macOS while keeping them on Linux for simulation/callgrind profiling. --- go-runner/src/runner/mod.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/go-runner/src/runner/mod.rs b/go-runner/src/runner/mod.rs index e8d92c2..32af1ff 100644 --- a/go-runner/src/runner/mod.rs +++ b/go-runner/src/runner/mod.rs @@ -47,10 +47,20 @@ fn run_cmd>( // Convert the CLI struct into a command: let mut cmd = Command::new(go_binary); + + // On macOS, Go 1.26+ invokes dsymutil to extract DWARF into a .dSYM bundle. + // dsymutil can be OOM-killed on large cgo binaries, failing the build. + // Walltime mode never reads DWARF symbols, so disabling them on macOS is safe. + // On Linux, keep symbols for simulation/callgrind profiling. + let ldflags = if cfg!(target_os = "macos") { + "-ldflags=-w" + } else { + "-ldflags=-s=false -w=false" + }; + cmd.args([ "test", - // Disable stripping of symbols and debug information - "-ldflags=-s=false -w=false", + ldflags, // Keep the test binary on disk after executing it. This is required by // the runner to properly parse the symbols and debug info. "-work", From f317ec1e3d33e89ef4a8eddc88695b9d4fb6a356 Mon Sep 17 00:00:00 2001 From: not-matthias Date: Fri, 22 May 2026 14:37:38 +0200 Subject: [PATCH 4/5] fixup: darwin bench --- .github/workflows/ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36f83a8..231bd2c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,14 +85,10 @@ jobs: - name: Run the benchmarks uses: CodSpeedHQ/action@main - env: - CODSPEED_SKIP_UPLOAD: "true" with: - run: cargo r --release --manifest-path ../go-runner/Cargo.toml -- test -bench=. example -benchtime=500ms + run: cargo r --release --manifest-path ../go-runner/Cargo.toml -- test -bench=BenchmarkFibonacciDarwin example -benchtime=500ms working-directory: example mode: walltime - # TODO: Remove this once the runner has been released with macos support - runner-version: branch:main go-runner-benchmarks: runs-on: codspeed-macro From e70400b94d1e2fed5febd17597fb19b4d3bf238c Mon Sep 17 00:00:00 2001 From: not-matthias Date: Fri, 22 May 2026 14:45:47 +0200 Subject: [PATCH 5/5] wip: use latest runner for flamegraphs --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 231bd2c..bd8379d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,9 +86,14 @@ jobs: - name: Run the benchmarks uses: CodSpeedHQ/action@main with: - run: cargo r --release --manifest-path ../go-runner/Cargo.toml -- test -bench=BenchmarkFibonacciDarwin example -benchtime=500ms + run: | + echo "PATH=$PATH" + which -a go + go env GOROOT || echo "go env GOROOT exited $?" + cargo r --release --manifest-path ../go-runner/Cargo.toml -- test -bench=BenchmarkFibonacciDarwin example -benchtime=500ms working-directory: example mode: walltime + runner-version: branch:main go-runner-benchmarks: runs-on: codspeed-macro