Found this papercut when looking at Leyden perf runs.
In OopMapSort::sort, there is a loop that apparently is only there for asserts: https://github.com/openjdk/jdk/blob/0c36177fead8b64a4cee9da3c895e3799f8ba231/src/hotspot/share/compiler/oopMap.cpp#L249-L252
At least GCC 11.4 apparently not smart enough to eliminate the whole loop in release builds. Wrapping the loop with #ifdef ASSERT saves about 144 bytes in code stream.
In OopMapSort::sort, there is a loop that apparently is only there for asserts: https://github.com/openjdk/jdk/blob/0c36177fead8b64a4cee9da3c895e3799f8ba231/src/hotspot/share/compiler/oopMap.cpp#L249-L252
At least GCC 11.4 apparently not smart enough to eliminate the whole loop in release builds. Wrapping the loop with #ifdef ASSERT saves about 144 bytes in code stream.
- links to
-
Commit(master) openjdk/jdk/0e0f10f9
-
Review(master) openjdk/jdk/20992