RFR: 8259242: Remove ProtectionDomainSet_lock [v3]
Coleen Phillimore
coleenp at openjdk.java.net
Fri Apr 9 11:04:27 UTC 2021
On Fri, 9 Apr 2021 01:53:04 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Make ProtectionDomainEntry delete list global and set a threshold for deletions before handshaking. Fix if to when.
>
> src/hotspot/share/classfile/dictionary.cpp line 560:
>
>> 558: void DictionaryEntry::print_count(outputStream *st) {
>> 559: int count = 0;
>> 560: for (ProtectionDomainEntry* current = pd_set_acquire(); // accessed inside SD lock
>
> Can the end-of-line comment get promoted to a full line comment before the loop - or even an assert that the lock is held.
Ok, I added an assert instead. This logging at pd_set creation time is sort of useless, but it's useful at PrintSystemDictionaryAtExit time.
> src/hotspot/share/classfile/protectionDomainCache.cpp line 116:
>
>> 114: _delete_list = new (ResourceObj::C_HEAP, mtClass)
>> 115: GrowableArray<ProtectionDomainEntry*>(20, mtClass);
>> 116: }
>
> What is protecting this code to ensure the allocation can only happen once?
Yes. This functions is only called from the service thread.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3362
More information about the hotspot-dev
mailing list