mirror of
https://github.com/codeflash-ai/codeflash.git
synced 2026-05-04 18:25:17 +00:00
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:
parent
bfe6f3a828
commit
fefccd5935
1 changed files with 1 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue