RFR: 8364282: ZGC: Improve ZPageAllocation JFR event sending

Joel Sikström jsikstro at openjdk.org
Tue Jul 29 13:56:07 UTC 2025


Hello,

This is a follow up to [JDK-8350441](https://bugs.openjdk.org/browse/JDK-8350441), improving on how the ZPageAllocation JFR event is sent. 

The starting time for the event is measured separately from creating a local event varaible (EventZPageAllocation). This means it is better to use the anonymous EventZPageAllocation::commit rather than creating an event and sending that event, which would record the starting time again, unnecessarily.

Additionally, if the event is not enabled (either specifically or if JFR is disabled), we should not waste time sampling statistics for the event.

Testing:
* Oracle's tier1-4

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

Commit messages:
 - 8364282: ZGC: Improve ZPageAllocation JFR event sending

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

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


More information about the hotspot-gc-dev mailing list