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

David Holmes dholmes at openjdk.org
Tue Jan 7 05:49:47 UTC 2025


On Mon, 6 Jan 2025 18:32:44 GMT, Fredrik Bredberg <fbredberg at openjdk.org> wrote:

>> src/hotspot/share/runtime/synchronizer.cpp line 1288:
>> 
>>> 1286:         _no_progress_cnt >= NoAsyncDeflationProgressMax) {
>>> 1287:       double remainder = (100.0 - MonitorUsedDeflationThreshold) / 100.0;
>>> 1288:       size_t delta = (size_t)((double)ceiling * remainder) + 1;
>> 
>> Suggestion:
>> 
>>       size_t delta = (size_t)(ceiling * remainder) + 1;
>
> The original source (before this PR) had the `(double)` cast, and I wanted to keep the diff as short as possible. It really doesn't matter since `remainder` is of type `double`.

The cast is redundant so it was just an opportunity to clean up when touching the code.

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

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


More information about the hotspot-runtime-dev mailing list