--- old/src/share/vm/compiler/compileBroker.cpp 2013-10-11 15:44:35.509819670 +0200 +++ new/src/share/vm/compiler/compileBroker.cpp 2013-10-11 15:44:35.265819679 +0200 @@ -1592,9 +1592,12 @@ // 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::MethodNonProfiled; code_blob_type <= CodeBlobType::MethodProfiled; ++code_blob_type) { + if (CodeCache::is_full(code_blob_type)) { + // The CodeHeap for this compilation level is really full + handle_full_code_cache(code_blob_type); + } } CompileTask* task = queue->get(); @@ -1917,9 +1920,9 @@ // ------------------------------------------------------------------ // CompileBroker::handle_full_code_cache // -// The CodeCache is full. Print out warning and disable compilation or -// try code cache cleaning so compilation can continue later. -void CompileBroker::handle_full_code_cache() { +// The CodeCache is full. Disable 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) { @@ -1935,11 +1938,6 @@ 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(); - #ifndef PRODUCT if (CompileTheWorld || ExitOnFullCodeCache) { @@ -1960,7 +1958,7 @@ AlwaysCompileLoopMethods = false; } } - codecache_print(/* detailed= */ true); + CodeCache::report_codemem_full(code_blob_type); } // ------------------------------------------------------------------