Skip to content

Commit 6a180db

Browse files
committed
feat: pass java options benchmark
1 parent 79ac610 commit 6a180db

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/executor/helpers/env.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ pub fn get_base_injected_env(
2929
"0".into()
3030
},
3131
),
32+
// Java: Enable frame pointers and perf map generation for flamegraph profiling.
33+
// - UnlockDiagnosticVMOptions must come before DumpPerfMapAtExit (diagnostic option).
34+
// - PreserveFramePointer: Preserves frame pointers for profiling.
35+
// - DumpPerfMapAtExit: Writes /tmp/perf-<pid>.map on JVM exit for symbol resolution.
36+
// - DebugNonSafepoints: Enables debug info for JIT-compiled non-safepoint code.
37+
(
38+
"JAVA_TOOL_OPTIONS",
39+
if mode == RunnerMode::Walltime {
40+
"-XX:+PreserveFramePointer -XX:+UnlockDiagnosticVMOptions -XX:+DumpPerfMapAtExit -XX:+DebugNonSafepoints".into()
41+
} else {
42+
"".into()
43+
},
44+
),
3245
("ARCH", ARCH.into()),
3346
("CODSPEED_ENV", "runner".into()),
3447
(

0 commit comments

Comments
 (0)