8177899: Tests fail due to code cache exhaustion on machines with many cores

Implemented upper limit on CICompilerCount based on code cache size.

Reviewed-by: kvn, mdoerr
This commit is contained in:
Tobias Hartmann 2018-10-30 09:06:08 +01:00
parent d9d067369b
commit 4b27547977
7 changed files with 45 additions and 15 deletions

View file

@ -274,10 +274,10 @@ void CodeCache::initialize_heaps() {
}
// Make sure we have enough space for VM internal code
uint min_code_cache_size = CodeCacheMinimumUseSpace DEBUG_ONLY(* 3);
if (non_nmethod_size < (min_code_cache_size + code_buffers_size)) {
if (non_nmethod_size < min_code_cache_size) {
vm_exit_during_initialization(err_msg(
"Not enough space in non-nmethod code heap to run VM: " SIZE_FORMAT "K < " SIZE_FORMAT "K",
non_nmethod_size/K, (min_code_cache_size + code_buffers_size)/K));
non_nmethod_size/K, min_code_cache_size/K));
}
// Verify sizes and update flag values