RFR: 8259349: -XX:AvgMonitorsPerThreadEstimate=1 does not work right [v2]
Daniel D.Daugherty
dcubed at openjdk.java.net
Fri Jan 8 13:56:58 UTC 2021
On Fri, 8 Jan 2021 06:40:49 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix build error on windows.
>
> src/hotspot/share/runtime/synchronizer.cpp line 1187:
>
>> 1185: // but in reality the ceiling should never get that high.
>> 1186: _in_use_list_ceiling = (jint)new_value;
>> 1187: }
>
> I'm sure I must have asked this before but why is AvgMonitorsPerThreadEstimate typed as `intx` rather than `int`? A `jint is 32-bit and so is `int` on all our 32-bit and 64-bit platforms; whereas `intx` is 64-bit on a 64-bit system.
>
> And if we only ever set this field once why introduce a seemingly general use setter function instead of just doing the initialization directly in the initialize() method?
@dholmes-ora - Thanks for the review.
The `intx` type was copied from some other option when `AvgMonitorsPerThreadEstimate`
was introduced. I'd have to look to see why `intx` is used instead of `int` in options.
set_in_use_list_ceiling() is used in this fix and also in the follow on fix: JDK-8226416.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1992
More information about the hotspot-runtime-dev
mailing list