RFR: 8223961: ZGC: Unexpected behaviour was observed caused by the incorrect update of _nticks in ZMetronome::wait_for_tick()
Per Liden
per.liden at oracle.com
Thu May 16 06:25:18 UTC 2019
Hi,
There is code in ZStat that assumes ZMetronome::ntick() never skips over
ticks. That would need to be addressed if we do something like this.
Otherwise we risk not getting statistics print outs just because the
metronome overslept. I'll take a look at it.
cheers,
Per
On 05/15/2019 04:33 PM, Jie Fu wrote:
> Hi all,
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8223961
>
> Please review the following patch which fixes the update of "_nticks" in
> ZMetronome::wait_for_tick()
> -----------------------------------
> diff -r b0b20413d853 src/hotspot/share/gc/z/zMetronome.cpp
> --- a/src/hotspot/share/gc/z/zMetronome.cpp Wed May 15 11:53:47 2019
> +0200
> +++ b/src/hotspot/share/gc/z/zMetronome.cpp Wed May 15 20:15:39 2019
> +0800
> @@ -57,6 +57,8 @@
> if (!_stopped && timeout_ms > 0) {
> // Wait
> ml.wait(timeout_ms);
> + } else if (timeout_ms < -1 * (int64_t)_interval_ms) {
> + _nticks += -timeout_ms / _interval_ms;
> } else {
> // Tick
> return !_stopped;
> -----------------------------------
> For more info, please see the JBS.
>
> Testing:
> - make test TEST="hotspot_gc" CONF=release
>
> Thanks a lot.
> Best regards,
> Jie
>
>
More information about the hotspot-gc-dev
mailing list