RFR: 8264126: Remove TRAPS/THREAD parameter for class loading functions [v2]

Ioi Lam iklam at openjdk.java.net
Wed Mar 24 20:38:40 UTC 2021


On Wed, 24 Mar 2021 19:32:54 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/hotspot/share/classfile/systemDictionaryShared.cpp line 1864:
>> 
>>> 1862:   }
>>> 1863: 
>>> 1864:   if (Thread::current()->is_VM_thread()) {
>> 
>> For performance, maybe it's better:
>> if (DynamicDumpSharedSpaces) {
>>   if (Thread::current()->is_VM_thread()) {
>>     return;
>>   }
>> } else {
>>   assert(!Thread::current()->is_VM_thread(), ".....");
>> }
>
> So we always dump dynamic shared spaces from the VMThread?

When DynamicDumpSharedSpaces is true, this code can be executed in a Java thread or a VM thread. When it's in the VM thread, we cannot proceed to the code below and must return immediately.

When DynamicDumpSharedSpaces is false, this code cannot be executed in a VM thread.

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

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


More information about the hotspot-dev mailing list