RFR: 8259349: -XX:AvgMonitorsPerThreadEstimate=1 does not work right [v4]

Coleen Phillimore coleenp at openjdk.java.net
Fri Jan 8 23:12:01 UTC 2021


On Fri, 8 Jan 2021 22:24:13 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> This is a trivial fix to make the "-XX:AvgMonitorsPerThreadEstimate"
>> option work correctly for values < 1024.
>> 
>> I've locally built and tested this fix on my MBP13. It will be included in my
>> next Mach5 Tier[1-3] testing batch.
>
> Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision:
> 
>   delete bad assert found by linux build.

src/hotspot/share/runtime/synchronizer.cpp line 1173:

> 1171:   Atomic::add(&_in_use_list_ceiling, (jint)-AvgMonitorsPerThreadEstimate);
> 1172: }
> 1173: 

Did you find that this can go negative?  I can see that it could go to zero at shutdown maybe.

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

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


More information about the hotspot-runtime-dev mailing list