RFR (jdk10): JDK-8180175: ObjectSynchronizer only needs to iterate in-use monitors

David Holmes david.holmes at oracle.com
Thu May 18 02:07:25 UTC 2017


Roman,

I just pushed this but now I think there is a problem with this 
optimization.

When a thread terminates, omFlush is used to transfer the thread's 
inUseList to the global inUseList. This happens after the thread has 
been removed from the _threads_list and can run concurrently with a 
safepoint. This means that there is a window of time where the monitors 
in the thread's inUseList will not be seen by the safepoint oops_do 
processing:
- the thread oops_do won't be called because the thread is not in the 
thread's list
- the monitors are not yet in the global in-use-list

Did I overlook something?

David

On 18/05/2017 7:45 AM, David Holmes wrote:
> Hi Roman,
>
> I can sponsor this for you. BTW Robbin should also be listed as a
> reviewer - I'll add him.
>
> David
>
> On 18/05/2017 7:38 AM, Roman Kennke wrote:
>> Am 17.05.2017 um 23:35 schrieb David Holmes:
>>> On 18/05/2017 7:25 AM, Roman Kennke wrote:
>>>>
>>>>> Looks good to me. Some comments will be nice.
>>>> Like this:
>>>>
>>>> http://cr.openjdk.java.net/~rkennke/8180175/webrev.01/
>>>> <http://cr.openjdk.java.net/%7Erkennke/8180175/webrev.01/>
>>>
>>> +     // and the remaing global monitors in
>>> ObjectSynchronizer::oops_do().
>>>
>>> Typo: remaing
>>
>> Ok. Fixed.
>> Final webrev:
>>
>> http://cr.openjdk.java.net/~rkennke/8180175/webrev.02/
>> <http://cr.openjdk.java.net/%7Erkennke/8180175/webrev.02/>
>>
>> If it's ok, I'm going to need a sponsor. ?
>>
>> Thanks, Roman
>>


More information about the hotspot-runtime-dev mailing list