RFR(S) 8231257 (CDS) Avoid calling FileMapInfo::write_region twice

Ioi Lam ioi.lam at oracle.com
Thu Sep 19 16:39:12 UTC 2019


https://bugs.openjdk.java.net/browse/JDK-8231257
http://cr.openjdk.java.net/~iklam/jdk14/8231257-call-write-region-once.v01/

Please review this clean up in CDS:

We call FileMapInfo::write_region twice in a loop --

+ first time just to store the CRC and offset into in the file header
+ second time is to actually write the region

This is awkward. The whole reason is for writing the file header before 
writing the regions.

But that's not necessary. We should first write the regions, then seek 
back to position 0, and write the header.

Thanks
- Ioi



<https://bugs.openjdk.java.net/browse/JDK-8231257>


More information about the hotspot-runtime-dev mailing list