Skip to content

Commit d4687ff

Browse files
fix: use fp unwinding mode when running go test
Go does not produce .eh_frame sections needed for dwarf unwinding. In dwarf mode, perf captures a stack snapshot that we can use to fall back to frame pointer unwinding via framehop. However on arm64, the snapshot is missing a key register (x29/FP) due to Go's non-standard function calling convention, so the framehop fallback fails. Using callgraph mode fp avoids this entirely: the kernel performs the unwinding itself with full access to the stack.
1 parent 106e731 commit d4687ff

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • src/executor/wall_time/perf

src/executor/wall_time/perf/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ impl PerfRunner {
9898
(mode, None)
9999
} else if config.command.contains("cargo") {
100100
(UnwindingMode::Dwarf, None)
101+
} else if config.command.contains("go test") {
102+
(UnwindingMode::FramePointer, None)
101103
} else if config.command.contains("pytest")
102104
|| config.command.contains("uv")
103105
|| config.command.contains("python")

0 commit comments

Comments
 (0)