RFR: 8332506: SIGFPE In ObjectSynchronizer::is_async_deflation_needed() [v3]
David Holmes
dholmes at openjdk.org
Tue Jan 7 05:54:43 UTC 2025
On Mon, 6 Jan 2025 18:48:31 GMT, Fredrik Bredberg <fbredberg at openjdk.org> wrote:
>> src/hotspot/share/runtime/synchronizer.cpp line 1307:
>>
>>> 1305: ", monitor_usage=" SIZE_FORMAT ", threshold=%d",
>>> 1306: monitors_used, ceiling, monitor_usage, MonitorUsedDeflationThreshold);
>>> 1307: return is_above_threshold;
>>
>> This can now return false if the monitor usage has fallen below the threshold again - is that what should be returned??
>
> Rather than thinking that _"...the monitor usage has fallen below the threshold again"_ you should be thinking _"the ceiling value wasn't increased enough"_. So, to answer your question - yes that is what should be returned.
>
> This has to do with the actual math behind calculating `new_ceiling` which I describe [here](https://github.com/openjdk/jdk/pull/22815#discussion_r1890907858). Even though it's definitely non-intuitive and maybe a bit disturbing, it does work in the end. So fixing that can be postponed to a later PR.
Yeah well, sorry but I don't get the new math or the old math and we now seem to have a change in behaviour, the affect of which I can't gauge.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22815#discussion_r1904938552
More information about the hotspot-runtime-dev
mailing list