From 6a180db3a936b91cbba539367f9af785f11b2ef8 Mon Sep 17 00:00:00 2001 From: not-matthias Date: Mon, 9 Mar 2026 18:30:42 +0100 Subject: [PATCH] feat: pass java options benchmark --- src/executor/helpers/env.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/executor/helpers/env.rs b/src/executor/helpers/env.rs index 51b6f714..9721e86e 100644 --- a/src/executor/helpers/env.rs +++ b/src/executor/helpers/env.rs @@ -29,6 +29,19 @@ pub fn get_base_injected_env( "0".into() }, ), + // Java: Enable frame pointers and perf map generation for flamegraph profiling. + // - UnlockDiagnosticVMOptions must come before DumpPerfMapAtExit (diagnostic option). + // - PreserveFramePointer: Preserves frame pointers for profiling. + // - DumpPerfMapAtExit: Writes /tmp/perf-.map on JVM exit for symbol resolution. + // - DebugNonSafepoints: Enables debug info for JIT-compiled non-safepoint code. + ( + "JAVA_TOOL_OPTIONS", + if mode == RunnerMode::Walltime { + "-XX:+PreserveFramePointer -XX:+UnlockDiagnosticVMOptions -XX:+DumpPerfMapAtExit -XX:+DebugNonSafepoints".into() + } else { + "".into() + }, + ), ("ARCH", ARCH.into()), ("CODSPEED_ENV", "runner".into()), (