ObjectSynchronizer iterate only in-use monitors?

Robbin Ehn robbin.ehn at oracle.com
Mon May 15 16:05:04 UTC 2017


Hi,

On 05/15/2017 04:52 PM, Roman Kennke wrote:
> Am 11.05.2017 um 09:44 schrieb Robbin Ehn:
>> Hi,
>>
>> We have actually been discussing this last few days:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8153224
> 
> We are seeing the exact same issue as mentioned in the bug report too.
> Sometimes, time-to-safepoint is very high, in the area of ~200ms. The
> reason for this seems to be deflate_idle_monitors().
> 
> In the current implementation, the VM thread iterates over all threads,
> and deflates each thread's idle monitors one after another.
> 
> I would rather have each Java thread deflate its own idle monitors
> before arriving at a safepoint. This should be much faster because
> higher chances a thread has its own monitors in cache, and deflation
> processing is done in parallel too. This requires some thought... e.g.
> what to do with non-runnable threads.

Sounds like a reasonable approach.

> 
> If you think that's a good way to go, and don't already have a fix in
> the pipeline, I can take on the bug. I've got synchronizer still hot in
> memory, and experimented with self-processing Java threads before
> safepoint a while back too.

Sure, give it go, thanks!

/Robbin

> 
> Let me know!
> 
> Roman
> 
> 


More information about the hotspot-runtime-dev mailing list