RFR: 8259242: Remove ProtectionDomainSet_lock [v2]

Coleen Phillimore coleenp at openjdk.java.net
Thu Apr 8 23:09:58 UTC 2021


On Thu, 8 Apr 2021 20:18:21 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add acquire/release and update names.
>
> src/hotspot/share/classfile/dictionary.cpp line 92:
> 
>> 90:   // This doesn't require a lock because nothing is reading this
>> 91:   // entry anymore.  The ClassLoader is dead.
>> 92:   if (entry->pd_set_acquire() != NULL) {
> 
> I think this should still be a 'while' to remove the whole list.

You're right, thank you for finding this.  I was going to rewrite this to call a function so I can access _next directly.

> src/hotspot/share/classfile/protectionDomainCache.cpp line 93:
> 
>> 91:   // with the caller class and class loader, which if still alive will keep this
>> 92:   // protection domain entry alive.
>> 93:   if (delete_list->length() != 0) {
> 
> If you want you could also use a threshold to decide when to issue the handshake, to avoid triggering it for very few entries (given removals seem to be rare already). See is_async_deflation_needed() for example.

I wanted to avoid making delete_list global and CHeap allocated.  I could do that and make the threshold 20.

> src/hotspot/share/classfile/protectionDomainCache.cpp line 211:
> 
>> 209: }
>> 210: 
>> 211: 
> 
> extra line?

removed.

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

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


More information about the hotspot-dev mailing list