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

Calvin Cheung ccheung at openjdk.org
Thu Aug 4 21:29:44 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

Coleen,
Thanks for your review.
When the `Modules::define_archived_modules()` is called from java, we can cache the platform and system class loaders so that we don't need to do another java upcall again to set them up later in `SystemDictionary::compute_java_loaders()`.

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

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


More information about the hotspot-runtime-dev mailing list