[jdk18] RFR: 8279597: [TESTBUG] ReturnBlobToWrongHeapTest.java fails with -XX:TieredStopAtLevel=1 on machines with many cores [v2]

Vladimir Kozlov kvn at openjdk.java.net
Thu Jan 13 21:14:28 UTC 2022


On Thu, 13 Jan 2022 05:47:05 GMT, Hao Sun <haosun at openjdk.org> wrote:

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

Good  and trivial.

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

Marked as reviewed by kvn (Reviewer).

PR: https://git.openjdk.java.net/jdk18/pull/93


More information about the hotspot-compiler-dev mailing list