RFR: 8332506: SIGFPE In ObjectSynchronizer::is_async_deflation_needed() [v3]

Fredrik Bredberg fbredberg at openjdk.org
Mon Jan 6 18:51:40 UTC 2025


On Mon, 6 Jan 2025 01:45:03 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Fredrik Bredberg has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update two after review
>
> 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.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22815#discussion_r1904513710


More information about the hotspot-runtime-dev mailing list