RFR: JDK-8222373 Improve CDS performance for custom class loaders

yumin qi yumin.qi at gmail.com
Thu Jun 20 01:36:18 UTC 2019


Hi, Please review:
bug: https://bugs.openjdk.java.net/browse/JDK-8222373
webrev: http://cr.openjdk.java.net/~minqi/8222373/01/

To load shared class from CDS, first class file stream is read from jar
file, then load the class with the stream. In vm, the stream is used to
calculate file size and crc32 which are used to compare with the counter
parts stored in CDS.

In fact, when CDS mapped, every SharedClassPathEntry is checked for
validation, if there is mismatch JVM will exit. That is, if user updated
jars and did not recreated CDS archive, it would fail. This can make us
load the class from CDS directly (if it is in CDS) without checking class
file length and crc32, so skip getting byte stream from source to save time.

Tests: submit passed
local on linux-x86_64: jtreg/runtime


Thanks
Yumin


More information about the hotspot-runtime-dev mailing list