RFR: 8246260: JFR: Write event size field without padding

Erik Gahlin erik.gahlin at oracle.com
Mon Jun 1 19:32:03 UTC 2020


Hi,

Could I have a review of a fix that reduces the size of a recording with 10-15% by writing the event size field in compressed integer form instead of the padded format (4 bytes). 

The implementation gambles on that an event takes up less than 128 bytes and writes the size as a single byte. If it is not true, it rewrites the event from start and tags the event type as large, so the next time an event of the same type is to be written, the penalty will not need to be paid.

The change is compatible with the current file format.

Bug:
https://bugs.openjdk.java.net/browse/JDK-8246260

Webrev:
http://cr.openjdk.java.net/~egahlin/8246260/

Testing: tier1 + tier2 + jdk/jfr/jfr + JMC

Thanks
Erik


More information about the hotspot-jfr-dev mailing list