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