RFR: 8291840: Avoid JavaCalls for setting up _java_system_loader and _java_platform_loader [v3]

David Holmes dholmes at openjdk.org
Fri Aug 5 04:08:05 UTC 2022


On Thu, 4 Aug 2022 18:14:11 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> Please review this small optimization for setting up the `_java_system_loader `and `_java_platform_loader`.
>> 
>> I saw startup perf improvements with HelloWorld on linux-x64 like the following:
>> 
>> 
>> instr delta =      -102248    -0.1226%
>> time  delta =       -0.125 ms -0.3507%
>> 
>> 
>> Passed tiers 1,2,3 testing.
>
> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
> 
>   add assert to the _java_platform_loader case

src/hotspot/share/classfile/systemDictionary.cpp line 185:

> 183:   if (_java_system_loader.is_empty()) {
> 184:     _java_system_loader = cld->class_loader_handle();
> 185:   }

Wouldn't it be an error to call this when the loader has already been set?

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

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


More information about the hotspot-runtime-dev mailing list