File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,18 @@ pub fn get_base_injected_env(
4242 ) ,
4343 ] ) ;
4444
45+ // Java: Enable frame pointers and perf map generation for flamegraph profiling.
46+ // - UnlockDiagnosticVMOptions must come before DumpPerfMapAtExit (diagnostic option).
47+ // - PreserveFramePointer: Preserves frame pointers for profiling.
48+ // - DumpPerfMapAtExit: Writes /tmp/perf-<pid>.map on JVM exit for symbol resolution.
49+ // - DebugNonSafepoints: Enables debug info for JIT-compiled non-safepoint code.
50+ if mode == RunnerMode :: Walltime {
51+ env. insert (
52+ "JAVA_TOOL_OPTIONS" . into ( ) ,
53+ "-XX:+PreserveFramePointer -XX:+UnlockDiagnosticVMOptions -XX:+DumpPerfMapAtExit -XX:+DebugNonSafepoints" . into ( ) ,
54+ ) ;
55+ }
56+
4557 if let Some ( version) = & config. go_runner_version {
4658 env. insert ( "CODSPEED_GO_RUNNER_VERSION" . into ( ) , version. to_string ( ) ) ;
4759 }
You can’t perform that action at this time.
0 commit comments