Increased safepoint cleanup tasks in Java 11 (vs 8)

David Holmes david.holmes at oracle.com
Thu Jun 6 10:41:27 UTC 2019


On 6/06/2019 8:16 pm, Milan Mimica wrote:
> On Thu, 6 Jun 2019 at 02:41, Daniel D. Daugherty
> <daniel.daugherty at oracle.com> wrote:
>>
>> Java Monitor inflation is caused by:
>>
>> - contention on the same monitor between 2 or more threads
>> - monitor.wait() call
>> - synchronized (obj) { obj.hashCode(); }

Or System.identityHashCode(obj)

>>
>> The last one is specific to the HotSpot VM.
> 
> It's the last one more general? hashCode() doesn't have to be invoked
> inside the sync block. Like this:
> synchronized (obj) { ... }, and later obj.hashCode() revokes biasing.

We're not discussing biased locking revocation here, but monitor inflation.

But yes, if an object is biased then any call to Object.hashCode or 
System.identityHashcode, will revoke the bias.

David
-----



More information about the hotspot-runtime-dev mailing list