[jdk18] RFR: 8279597: [TESTBUG] ReturnBlobToWrongHeapTest.java fails with -XX:TieredStopAtLevel=1 on machines with many cores [v2]
Hao Sun
haosun at openjdk.java.net
Thu Jan 13 05:47:05 UTC 2022
> This test failure occurred on machines with a lot of cores. Here is a
> snippet from the log file:
>
>
> ----------System.out:(14/1085)----------
> CompileCommand: dontinline compiler/codecache/stress/Helper$TestCase.method bool dontinline = true
> [0.046s][warning][codecache] CodeHeap 'non-profiled nmethods' is full. Compiler has been disabled.
> [0.046s][warning][codecache] Try increasing the code heap size using -XX:NonProfiledCodeHeapSize=
> CodeHeap 'non-profiled nmethods': size=8Kb used=7Kb max_used=7Kb free=0Kb
> bounds [0x0000ffff97b55000, 0x0000ffff97b57000, 0x0000ffff97b57000]
> CodeHeap 'non-nmethods': size=16376Kb used=941Kb max_used=941Kb free=15434Kb
> bounds [0x0000ffff96b57000, 0x0000ffff96dc7000, 0x0000ffff97b55000]
> total_blobs=269 nmethods=8 adapters=194
> compilation: disabled (not enough contiguous free space left)
> stopped_count=1, restarted_count=0
> full_count=1
> Error occurred during initialization of boot layer
> java.lang.InternalError: java.lang.NoSuchMethodException: no such method: java.lang.invoke.MethodHandle.linkToStatic(MemberName)Object/invokeStatic
> Caused by: java.lang.NoSuchMethodException: no such method: java.lang.invoke.MethodHandle.linkToStatic(MemberName)Object/invokeStatic
>
>
> On machines with many cores, the number of C1 temporary code buffers is
> big. See [1]. In my local test on a machine with 224 cores, `c1_count`
> equals to 21, and the total size for non-nmethod heap increases to about
> 16.5M.
>
> In this test case, `ReservedCodeCacheSize` is set as 16M, which is not
> enough for the non-nmethod heap. See [2]. As a result, non-profiled heap
> is set to (twice) the minimal size. As shown in the log file, the size
> is only 8Kb, which is very small and leads to failure at initialization
> phase.
>
> In this patch, we increase `ReservedCodeCacheSize` from 16M to 64M,
> which is big enough for machines with 1024 cores. Note that we continue
> to use the initial value for variable `largeBlobSize`.
>
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/code/codeCache.cpp#L200
> [2] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/code/codeCache.cpp#L216
Hao Sun has updated the pull request incrementally with one additional commit since the last revision:
Set CICompilerCount to a small value
Specify CICompilerCount to limit the number of compiler threads.
I think it's safe to set it as 2, according to
https://github.com/openjdk/jdk18/blob/master/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp#L54
-------------
Changes:
- all: https://git.openjdk.java.net/jdk18/pull/93/files
- new: https://git.openjdk.java.net/jdk18/pull/93/files/6b4682d3..60f78b0d
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk18&pr=93&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk18&pr=93&range=00-01
Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod
Patch: https://git.openjdk.java.net/jdk18/pull/93.diff
Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/93/head:pull/93
PR: https://git.openjdk.java.net/jdk18/pull/93
More information about the hotspot-compiler-dev
mailing list