File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,10 +47,13 @@ pub fn get_base_injected_env(
4747 // - PreserveFramePointer: Preserves frame pointers for profiling.
4848 // - DumpPerfMapAtExit: Writes /tmp/perf-<pid>.map on JVM exit for symbol resolution.
4949 // - DebugNonSafepoints: Enables debug info for JIT-compiled non-safepoint code.
50+ // - EnableDynamicAgentLoading: Suppresses warning when loading JVMTI agents at runtime.
51+ // - jdk.attach.allowAttachSelf: Allows the JVM to attach a JVMTI agent to itself
52+ // (used by codspeed-jvm's perf-map agent for @Fork(0) benchmarks).
5053 if mode == RunnerMode :: Walltime {
5154 env. insert (
5255 "JAVA_TOOL_OPTIONS" . into ( ) ,
53- "-XX:+PreserveFramePointer -XX:+UnlockDiagnosticVMOptions -XX:+DumpPerfMapAtExit -XX:+DebugNonSafepoints " . into ( ) ,
56+ "-XX:+PreserveFramePointer -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints -XX:+EnableDynamicAgentLoading -Djdk.attach.allowAttachSelf=true " . into ( ) ,
5457 ) ;
5558 }
5659
You can’t perform that action at this time.
0 commit comments