RFR: 8310675: Fix -Wconversion warnings in ZGC code
Joel Sikström
duke at openjdk.org
Tue Aug 6 14:00:02 UTC 2024
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.
-------------
Commit messages:
- 8310675: Fixed -Wconversion warnings in ZGC
Changes: https://git.openjdk.org/jdk/pull/20406/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20406&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8310675
Stats: 120 lines in 33 files changed: 5 ins; 0 del; 115 mod
Patch: https://git.openjdk.org/jdk/pull/20406.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20406/head:pull/20406
PR: https://git.openjdk.org/jdk/pull/20406
More information about the hotspot-gc-dev
mailing list