src/share/vm/compiler/compileBroker.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/compiler/compileBroker.cpp Wed Oct 9 15:17:14 2013
--- new/src/share/vm/compiler/compileBroker.cpp Wed Oct 9 15:17:14 2013
*** 1590,1602 ****
--- 1590,1605 ----
while (true) {
{
// We need this HandleMark to avoid leaking VM handles.
HandleMark hm(thread);
if (CodeCache::unallocated_capacity() < CodeCacheMinimumFreeSpace) {
// the code cache is really full
handle_full_code_cache();
+ // Iterate over non-profiled and profiled nmethods
+ for (int code_blob_type = CodeBlobType::MethodNoProfile; code_blob_type <= CodeBlobType::MethodProfile; ++code_blob_type) {
+ if (CodeCache::is_full(code_blob_type)) {
+ // The code heap for this compilation level is really full
+ handle_full_code_cache(code_blob_type);
+ }
}
CompileTask* task = queue->get();
// Give compiler threads an extra quanta. They tend to be bursty and
*** 1915,1927 ****
--- 1918,1930 ----
}
// ------------------------------------------------------------------
// CompileBroker::handle_full_code_cache
//
! // The CodeCache is full. Print out warning and disable compilation or
! // The CodeCache is full. Print out warning and delay compilation or
// try code cache cleaning so compilation can continue later.
! void CompileBroker::handle_full_code_cache(int code_blob_type) {
UseInterpreter = true;
if (UseCompiler || AlwaysCompileLoopMethods ) {
if (xtty != NULL) {
ResourceMark rm;
stringStream s;
*** 1933,1968 ****
--- 1936,1972 ----
xtty->begin_elem("code_cache_full");
xtty->print(s.as_string());
xtty->stamp();
xtty->end_elem();
}
warning("CodeCache is full. Compiler has been disabled.");
warning("Try increasing the code cache size using -XX:ReservedCodeCacheSize=");
CodeCache::report_codemem_full();
+ CodeCache::report_codemem_full(code_blob_type);
#ifndef PRODUCT
if (CompileTheWorld || ExitOnFullCodeCache) {
codecache_print(/* detailed= */ true);
before_exit(JavaThread::current());
exit_globals(); // will delete tty
vm_direct_exit(CompileTheWorld ? 0 : 1);
}
#endif
if (UseCodeCacheFlushing) {
+ // Because we now check for each CodeBlobType if the corresponding heap in the
+ // code cache is full and delay compilation if so, it does not make sense anymore
+ // to disable compilation for all CodeBlobTypes at this point.
+ /*
// Since code cache is full, immediately stop new compiles
if (CompileBroker::set_should_compile_new_jobs(CompileBroker::stop_compilation)) {
NMethodSweeper::log_sweep("disable_compiler");
NMethodSweeper::possibly_sweep();
}
+ */
} else {
UseCompiler = false;
AlwaysCompileLoopMethods = false;
}
}
codecache_print(/* detailed= */ true);
}
// ------------------------------------------------------------------
// CompileBroker::set_last_compile
//
src/share/vm/compiler/compileBroker.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File