RFR: 8346965: Test compiler/ciReplay/TestInlining.java fails with -XX:+SegmentedCodeCache

SendaoYan syan at openjdk.org
Mon Jan 6 12:45:43 UTC 2025


Hi all,
There are 4 tests fails run with JVM option '-XX:+SegmentedCodeCache'. JVM option '-XX:ReservedCodeCacheSize=4m' [inside test](https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/compiler/ciReplay/CiReplayBase.java#L68) conflict with JVM option '-XX:+SegmentedCodeCache' which pass from outside test. This PR add '-XX:-SegmentedCodeCache' explicitly inside test to make test run success whenever received '-XX:+SegmentedCodeCache' outside or not. Change has been verified locally, test-fix only, make test more robustness, no risk.

'SegmentedCodeCache' is enable by default

> java -XX:+PrintFlagsFinal 2>&1 | grep -P "(SegmentedCodeCache)|(ReservedCodeCacheSize)"
    uintx ReservedCodeCacheSize                    = 251658240                              {pd product} {ergonomic}
     bool SegmentedCodeCache                       = true                                      {product} {ergonomic}


Pass '-XX:ReservedCodeCacheSize=4m' to JVM will automatic disable `SegmentedCodeCache`

> java -XX:ReservedCodeCacheSize=4m -XX:+PrintFlagsFinal 2>&1 | grep -P "(SegmentedCodeCache)|(ReservedCodeCacheSize)"
    uintx ReservedCodeCacheSize                    = 4194304                                {pd product} {command line}
     bool SegmentedCodeCache                       = false                                     {product} {default}


'-XX:+SegmentedCodeCache' conflict with '-XX:ReservedCodeCacheSize=4m'

> java -XX:ReservedCodeCacheSize=4m -XX:+SegmentedCodeCache -version
Error occurred during initialization of VM
Invalid code heap sizes: NonNMethodCodeHeapSize (8006K) + ProfiledCodeHeapSize (4K) + NonProfiledCodeHeapSize (4K) = 8014K is greater than ReservedCodeCacheSize (4096K).

-------------

Commit messages:
 - 8346965: Test compiler/ciReplay/TestInlining.java fails with -XX:+SegmentedCodeCache

Changes: https://git.openjdk.org/jdk/pull/22926/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22926&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8346965
  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/22926.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22926/head:pull/22926

PR: https://git.openjdk.org/jdk/pull/22926


More information about the hotspot-compiler-dev mailing list