Mercurial > hg > truffle
diff src/share/vm/opto/output.cpp @ 10114:a7fb14888912
8006952: Slow VM due to excessive code cache freelist iteration
Summary: Remove continous free block requirement
Reviewed-by: kvn
author | neliasso |
---|---|
date | Thu, 11 Apr 2013 13:57:44 +0200 |
parents | 0a8c2ea3902d |
children | e10e43e58e92 |
line wrap: on
line diff
--- a/src/share/vm/opto/output.cpp Tue Apr 16 10:04:01 2013 -0700 +++ b/src/share/vm/opto/output.cpp Thu Apr 11 13:57:44 2013 +0200 @@ -1044,21 +1044,6 @@ debug_info->end_non_safepoint(pc_offset); } - - -// helper for fill_buffer bailout logic -static void turn_off_compiler(Compile* C) { - if (CodeCache::largest_free_block() >= CodeCacheMinimumFreeSpace*10) { - // Do not turn off compilation if a single giant method has - // blown the code cache size. - C->record_failure("excessive request to CodeCache"); - } else { - // Let CompilerBroker disable further compilations. - C->record_failure("CodeCache is full"); - } -} - - //------------------------------init_buffer------------------------------------ CodeBuffer* Compile::init_buffer(uint* blk_starts) { @@ -1158,7 +1143,7 @@ // Have we run out of code space? if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) { - turn_off_compiler(this); + C->record_failure("CodeCache is full"); return NULL; } // Configure the code buffer. @@ -1476,7 +1461,7 @@ // Verify that there is sufficient space remaining cb->insts()->maybe_expand_to_ensure_remaining(MAX_inst_size); if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) { - turn_off_compiler(this); + C->record_failure("CodeCache is full"); return; } @@ -1633,7 +1618,7 @@ // One last check for failed CodeBuffer::expand: if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) { - turn_off_compiler(this); + C->record_failure("CodeCache is full"); return; }