Skip to content

Commit fefccd5

Browse files
committed
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.
1 parent bfe6f3a commit fefccd5

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

codeflash/languages/java/tracer.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,7 @@ def create_tracer_config(
124124

125125
def build_jfr_env(self, jfr_file: Path) -> dict[str, str]:
126126
env = os.environ.copy()
127-
# Use profile settings with increased sampling frequency (1ms instead of default 10ms)
128-
# This captures more samples for short-running programs
129-
jfr_opts = (
130-
f"-XX:StartFlightRecording=filename={jfr_file.resolve()},settings=profile,dumponexit=true"
131-
",jdk.ExecutionSample#period=1ms"
132-
)
127+
jfr_opts = f"-XX:StartFlightRecording=filename={jfr_file.resolve()},settings=profile,dumponexit=true"
133128
existing = env.get("JAVA_TOOL_OPTIONS", "")
134129
env["JAVA_TOOL_OPTIONS"] = f"{existing} {jfr_opts}".strip()
135130
return env

0 commit comments

Comments
 (0)