RFR 8066171: Out of order with Metaspace allocation lock

Coleen Phillimore coleen.phillimore at oracle.com
Wed Dec 3 19:12:08 UTC 2014


On 12/3/14, 1:16 PM, Christian Thalinger wrote:
> Looks good.
>> On Dec 3, 2014, at 9:29 AM, Coleen Phillimore <coleen.phillimore at oracle.com> wrote:
>> I forgot to mention I tested by locking the DirtyCardQ_CBL_mon lock unconditionally in ConstantPoolCacheEntry::set_method_handle_common.
>> thanks,
>> Coleen
>> On 12/3/14, 11:59 AM, Coleen Phillimore wrote:
>>> Summary: Lock resolved_references instead.
>>> When I took out the constant pool mutex, I thought I could use the metaspace to synchronize this code sequence, but the metaspace_lock is out of order with the DirtyCardQ_CBL_mon lock that can sometimes be taken with obj_at_put() in an object array.   Since there is always a resolved_reference objArrayOop attached to this class, we can lock this for this cpCache entry. John and the JSR292 guys tell me that this code sequence needs to be locked against multiple setters.
>>> Tested with jdk/test/java/lang/invoke tests, nsk.quick.testlist.
>>> open webrev at http://cr.openjdk.java.net/~coleenp/8066171/
>>> bug link https://bugs.openjdk.java.net/browse/JDK-8066171
>>> Thanks,
>>> Coleen

More information about the hotspot-dev mailing list