RFR: 8310675: Fix -Wconversion warnings in ZGC code [v2]
Joel Sikström
duke at openjdk.org
Wed Aug 7 13:42:06 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.
Joel Sikström has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
- Merge branch 'master' into JDK-8310675
- 8310675: Fixed -Wconversion warnings in ZGC
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/20406/files
- new: https://git.openjdk.org/jdk/pull/20406/files/5c3206cd..2b28a82f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=20406&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=20406&range=00-01
Stats: 13259 lines in 509 files changed: 6983 ins; 4162 del; 2114 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