RFR: 8346965: Multiple compiler/ciReplay test fails with -XX:+SegmentedCodeCache
Vladimir Kozlov
kvn at openjdk.org
Mon Jan 6 18:05:37 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).
Looks good.
-------------
Marked as reviewed by kvn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/22926#pullrequestreview-2532686600
More information about the hotspot-compiler-dev
mailing list