RFR: 8327450: The result of jfr view active-settings is invalid if jfr file is created by JDK 11 or JDK 8
Long Yang
duke at openjdk.org
Wed Mar 6 12:26:53 UTC 2024
Hi all
Could I have a review of this patch ?
If the jfr file is created by JDK 8 or JDK 11, and use jfr view to show the active-settings view, the result is invalid, missing many settings.
jfr view active-settings j11.jfr
Active Settings
Event Type Enabled Threshold Stack Trace Period Cutoff Throttle
------------- ---------- ------------ -------------- --------- --------- -----------
File Force true 20 ms true
---------------------------------------------------------
jfr summary j11.jfr
...
Event Type Count Size (bytes)
=============================================================
...
jdk.ActiveSetting 292 9528
...
The reason is the endTime of jdk.ActiveSetting on JDK 8 or JDK 11 increases naturally, the time between two consecutive events is approximately a few microseconds, but the query statement of active-settings view used LAST_BATCH(), It assumes that the end time of events are the same. For JDK 17 and above, this assumption is correct, but not for JDK 8 and JDK 11.
-------------
Commit messages:
- 8327450: The result of jfr view active-settings is invalid if jfr file is created by JDK 11 or JDK 8
Changes: https://git.openjdk.org/jdk/pull/18137/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18137&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8327450
Stats: 42 lines in 7 files changed: 27 ins; 0 del; 15 mod
Patch: https://git.openjdk.org/jdk/pull/18137.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18137/head:pull/18137
PR: https://git.openjdk.org/jdk/pull/18137
More information about the hotspot-jfr-dev
mailing list