RFR: 8340102: Move assert-only loop in OopMapSort::sort under debug macro
Aleksey Shipilev
shade at openjdk.org
Fri Sep 13 10:09:31 UTC 2024
Found this papercut when looking at Leyden perf runs.
In OopMapSort::sort, there is a loop that apparently is only there for asserts. At least GCC 11.4 apparently not smart enough to eliminate the whole loop in release builds, probably because iterator reads things from the stream. Wrapping the loop with #ifdef ASSERT saves about 144 bytes in code stream.
-------------
Commit messages:
- Fix
Changes: https://git.openjdk.org/jdk/pull/20992/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20992&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8340102
Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/20992.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20992/head:pull/20992
PR: https://git.openjdk.org/jdk/pull/20992
More information about the hotspot-compiler-dev
mailing list