fix: drop JFR inline event config that breaks JDK 11

The jdk.ExecutionSample#period=1ms syntax in -XX:StartFlightRecording
is only supported on JDK 13+. On JDK 11 (CI), it causes
"Failure when starting JFR on_create_vm_2" and no JFR file is created.
The settings=profile preset still provides 10ms CPU sampling.
This commit is contained in:
Kevin Turcios 2026-04-10 05:28:34 -05:00
parent bfe6f3a828
commit fefccd5935

View file

@ -124,12 +124,7 @@ class JavaTracer:
def build_jfr_env(self, jfr_file: Path) -> dict[str, str]:
env = os.environ.copy()
# Use profile settings with increased sampling frequency (1ms instead of default 10ms)
# This captures more samples for short-running programs
jfr_opts = (
f"-XX:StartFlightRecording=filename={jfr_file.resolve()},settings=profile,dumponexit=true"
",jdk.ExecutionSample#period=1ms"
)
jfr_opts = f"-XX:StartFlightRecording=filename={jfr_file.resolve()},settings=profile,dumponexit=true"
existing = env.get("JAVA_TOOL_OPTIONS", "")
env["JAVA_TOOL_OPTIONS"] = f"{existing} {jfr_opts}".strip()
return env