From 218b80c4b29dedef149c71397fe0023a7aa618bd Mon Sep 17 00:00:00 2001 From: not-matthias Date: Wed, 15 Apr 2026 17:44:10 +0200 Subject: [PATCH] chore: remove DumpPerfMapAtExit in favor of custom dumper --- src/executor/helpers/env.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/executor/helpers/env.rs b/src/executor/helpers/env.rs index 09b7c0f3..9fa659bc 100644 --- a/src/executor/helpers/env.rs +++ b/src/executor/helpers/env.rs @@ -47,10 +47,13 @@ pub fn get_base_injected_env( // - 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. + // - EnableDynamicAgentLoading: Suppresses warning when loading JVMTI agents at runtime. + // - jdk.attach.allowAttachSelf: Allows the JVM to attach a JVMTI agent to itself + // (used by codspeed-jvm's perf-map agent for @Fork(0) benchmarks). if mode == RunnerMode::Walltime { env.insert( "JAVA_TOOL_OPTIONS".into(), - "-XX:+PreserveFramePointer -XX:+UnlockDiagnosticVMOptions -XX:+DumpPerfMapAtExit -XX:+DebugNonSafepoints".into(), + "-XX:+PreserveFramePointer -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints -XX:+EnableDynamicAgentLoading -Djdk.attach.allowAttachSelf=true".into(), ); }