RFR: 8310675: Fix -Wconversion warnings in ZGC code

Albert Mingkun Yang ayang at openjdk.org
Tue Aug 6 14:28:32 UTC 2024


On Wed, 31 Jul 2024 13:01:50 GMT, Joel Sikström <duke at openjdk.org> wrote:

> Fixed `-Wconversion` warnings in ZGC code, either by adding an explicit type cast, changin the type of the variable or calling an equivalent method with other types. The largest change is the addition of `ZStatDurationSample`, which typecasts `Tickspan::value()` to a `uint64_t` and calls `ZStatSample` to make the code more readable.
> 
> I isolated the `-Wconversion` warnings for ZGC by adding the flag to clangd and displaying the errors in my IDE and going through each file directly associated with ZGC one by one.
> 
> Tested with tiers 1-3.

Marked as reviewed by ayang (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/20406#pullrequestreview-2221474896


More information about the hotspot-gc-dev mailing list