RFR: 8291840: Avoid JavaCalls for setting up _java_system_loader and _java_platform_loader [v3]
David Holmes
dholmes at openjdk.org
Thu Aug 11 07:53:28 UTC 2022
On Tue, 9 Aug 2022 18:04:59 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
>> 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?
>
> Hi David,
>
> Are you thinking about adding an `else` case to the function and call the `vm_exit_during_initialization()` ?
I was thinking:
void SystemDictionary::set_system_loader(ClassLoaderData *cld) {
assert(_java_system_loader.is_empty(), "already set!");
_java_system_loader = cld->class_loader_handle();
}
-------------
PR: https://git.openjdk.org/jdk/pull/9734
More information about the hotspot-runtime-dev
mailing list