RFR: 8249262: Initialize InstanceKlass::_package_entry during CDS dump time [v2]

Yumin Qi minqi at openjdk.java.net
Thu Jan 28 00:07:45 UTC 2021


On Tue, 26 Jan 2021 23:23:59 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> With JDK-8244778, the `PackageEntry` of all archived classes (for the 3 built-in class loaders) are all created during CDS dump time. We can remember this in `InstanceKlass::_package_entry` during dump time to avoid the hashtable lookup at runtime in `InstanceKlass::set_package()` and `SystemDictionaryShared::get_package_entry_from_class_name()`.
>> 
>> Passed tiers 1 - 4 testing.
>> 
>> Just a very small perf improvement with HelloWorld:
>> instr delta =        -9514    -0.0145%
>> time  delta =       -0.272 ms -0.6916%
>
> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
> 
>   1. updates per review comments from Ioi.
>   2. copyright update.

LGTM, if you leave the function name unchanged, it is OK.

src/hotspot/share/classfile/systemDictionaryShared.cpp line 1056:

> 1054: }
> 1055: 
> 1056: PackageEntry* SystemDictionaryShared::get_package_entry_from_class_name(InstanceKlass* ik, Handle class_loader) {

After the parameters changed, the function name is not a good match to it. Should we change the function name?

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

Marked as reviewed by minqi (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/2206


More information about the hotspot-runtime-dev mailing list