--- old/src/share/vm/runtime/simpleThresholdPolicy.cpp 2013-10-09 15:17:18.204404432 +0200 +++ new/src/share/vm/runtime/simpleThresholdPolicy.cpp 2013-10-09 15:17:17.824404447 +0200 @@ -330,7 +330,13 @@ break; } } - return MIN2(next_level, (CompLevel)TieredStopAtLevel); + + next_level = MIN2(next_level, (CompLevel)TieredStopAtLevel); + if (CodeCache::is_full(CodeCache::get_code_blob_type(next_level))) { + // The CodeHeap for next_level is full, stay at current level + return cur_level; + } + return next_level; } // Determine if a method should be compiled with a normal entry point at a different level.