RFR: 8346965: Multiple compiler/ciReplay test fails with -XX:+SegmentedCodeCache

SendaoYan syan at openjdk.org
Tue Jan 7 01:14:39 UTC 2025


On Mon, 6 Jan 2025 12:41:13 GMT, SendaoYan <syan at openjdk.org> wrote:

> 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).

GHA report 1 failure:

1. 'macos-x64 / test - Test (tier1)' job fails 'GitHub Actions 11 lost communication with the server.', it seems like environmental issue, it's unrelated to this PR.

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

PR Comment: https://git.openjdk.org/jdk/pull/22926#issuecomment-2574205150


More information about the hotspot-compiler-dev mailing list