RFR: 8360783: CTW: Skip deoptimization between tiers [v2]
Aleksey Shipilev
shade at openjdk.org
Fri Jun 27 08:38:31 UTC 2025
> When profiling CTW runs, I noticed we spend a lot of time dealing with deoptimization. We do this excessively, deoptimizing before compilation on every tier. This is excessive: Hotspot honors compilation requests on subsequent levels without the need for explicit deoptimization. Not doing deopt between tiers greatly improves CTW performance.
>
> A taste of improvements, about 15% less CPU spent:
>
>
> $ time make test TEST=applications/ctw/modules
>
> # Current
> real 5m1.616s
> user 79m41.398s
> sys 14m39.607s
>
> # Patched
> real 3m55.411s
> user 69m19.227s
> sys 5m24.323s
>
>
> The compilation still works as expected, progressing through tiers 1..4:
>
>
> $ JAVA_OPTIONS="-XX:+PrintCompilation -XX:CICompilerCount=2" ./ctw.sh modules:jdk.compiler | tee out
> ...
> $ grep sun.tools.serialver.resources.serialver_de::getContents out
> 101783 55033 b 1 sun.tools.serialver.resources.serialver_de::getContents (108 bytes)
> 101785 55036 b 2 sun.tools.serialver.resources.serialver_de::getContents (108 bytes)
> 101786 55033 1 sun.tools.serialver.resources.serialver_de::getContents (108 bytes) made not entrant: not used
> 101786 55038 b 3 sun.tools.serialver.resources.serialver_de::getContents (108 bytes)
> 101787 55036 2 sun.tools.serialver.resources.serialver_de::getContents (108 bytes) made not entrant: not used
> 101792 55040 b 4 sun.tools.serialver.resources.serialver_de::getContents (108 bytes)
> 101797 55038 3 sun.tools.serialver.resources.serialver_de::getContents (108 bytes) made not entrant: not used
> 101798 55040 4 sun.tools.serialver.resources.serialver_de::getContents (108 bytes) made not entrant: marked for deoptimization
Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
Update test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java
Co-authored-by: Tobias Hartmann <tobias.hartmann at oracle.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/26013/files
- new: https://git.openjdk.org/jdk/pull/26013/files/7dce90f7..34913a48
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=26013&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=26013&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/26013.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26013/head:pull/26013
PR: https://git.openjdk.org/jdk/pull/26013
More information about the hotspot-compiler-dev
mailing list