8022968: Some codecache allocation failures don't result in invoking the sweeper

Add calls to CompileBroker::handle_full_code_cache() or fail gracefully whenever allocation in the code cache fails.

Reviewed-by: iveresov, vlivanov
This commit is contained in:
Tobias Hartmann 2014-07-03 08:46:44 +02:00
parent b5e96ad985
commit fa6b220619
5 changed files with 11 additions and 0 deletions

View file

@ -29,6 +29,7 @@
#include "classfile/systemDictionary.hpp"
#include "code/exceptionHandlerTable.hpp"
#include "code/nmethod.hpp"
#include "compiler/compileBroker.hpp"
#include "compiler/compileLog.hpp"
#include "compiler/disassembler.hpp"
#include "compiler/oopMap.hpp"
@ -555,6 +556,7 @@ void Compile::init_scratch_buffer_blob(int const_size) {
if (scratch_buffer_blob() == NULL) {
// Let CompilerBroker disable further compilations.
record_failure("Not enough space for scratch buffer in CodeCache");
CompileBroker::handle_full_code_cache();
return;
}
}