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

Coleen Phillimore coleenp at openjdk.org
Thu Aug 11 12:18:27 UTC 2022


On Thu, 11 Aug 2022 07:50:45 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> 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();
> }

Wait, I just realized, how does this not get into trouble with GC?  If we copy this OopHandle, then GC will follow it from two locations.  This doesn't seem right.

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

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


More information about the hotspot-runtime-dev mailing list