RFR: 8356968: JFR: Compilation event should be enabled for all compilations by default

Aleksey Shipilev shade at openjdk.org
Thu May 15 08:54:28 UTC 2025


In the field, we are using -XX:+PrintCompilation to track compiler performance. Alternatively, -Xlog:jit* prints the same. JFR has a the related jdk.Compilation event that gives us even richer diagnostics. Yet, that event is set at a very high threshold (1000ms), which skips almost all compilations! This threshold is set to such a high value from the beginning. 

It is fairly normal to have lots of compilations in 100+ ms range individually, and their sum impact is what we are after. Also, the compilations are normally quite rare, and there are a couple of thousands of compiles in most workloads, and they only happen sporadically. This means, the event count without any threshold is not high.

Therefore, it would be convenient to make sure that basic Compilation event is enabled unconditionally, e.g. by dropping the default threshold to 0.

See more logs in the bug itself.

Additional testing:
 - [x] Ad-hoc tests with printing compilation events
 - [x] Linux x86_64 server fastdebug, `jdk_jfr`

-------------

Commit messages:
 - Fix

Changes: https://git.openjdk.org/jdk/pull/25247/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25247&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8356968
  Stats: 13 lines in 1 file changed: 0 ins; 12 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/25247.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25247/head:pull/25247

PR: https://git.openjdk.org/jdk/pull/25247


More information about the hotspot-jfr-dev mailing list