RFR: 8226416: MonitorUsedDeflationThreshold can cause repeated async deflation requests [v4]

Daniel D.Daugherty dcubed at openjdk.java.net
Wed Jan 13 16:06:07 UTC 2021


On Wed, 13 Jan 2021 15:48:37 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> test/hotspot/jtreg/runtime/Monitor/MonitorUsedDeflationThresholdTest.java line 64:
>> 
>>> 62:         }
>>> 63: 
>>> 64:         Object obj = new Object();
>> 
>> This is a thread-local object, which means the synchronization has no affect, so I think C2 could elide the following sync-block. Using a static field would make it less likely that this can happen.
>
> Fixed.

But it has to be a static array of Objects since we want a new
ObjectMonitor per recursion.

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

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


More information about the hotspot-runtime-dev mailing list