Integrated: 8263446: Avoid unary minus over unsigned type in ObjectSynchronizer::dec_in_use_list_ceiling
Aleksey Shipilev
shade at openjdk.java.net
Mon Mar 15 06:29:08 UTC 2021
On Thu, 11 Mar 2021 13:14:01 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> SonarCloud complains:
> Unary minus should not be applied to an unsigned expression
>
> Here:
>
> void ObjectSynchronizer::dec_in_use_list_ceiling() {
> Atomic::add(&_in_use_list_ceiling, -AvgMonitorsPerThreadEstimate);
> }
>
> We can instead use `Atomic::sub`.
>
> Additional testing:
> - [x] Linux x86_64 fastdebug `hotspot:tier1`
This pull request has now been integrated.
Changeset: ba22e6f6
Author: Aleksey Shipilev <shade at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/ba22e6f6
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
8263446: Avoid unary minus over unsigned type in ObjectSynchronizer::dec_in_use_list_ceiling
Reviewed-by: eosterlund, dcubed
-------------
PR: https://git.openjdk.java.net/jdk/pull/2939
More information about the hotspot-runtime-dev
mailing list