src/share/vm/classfile/classLoader.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7018506 Cdiff src/share/vm/classfile/classLoader.cpp

src/share/vm/classfile/classLoader.cpp

Print this page

        

*** 1288,1297 **** --- 1288,1306 ---- } int ClassLoader::_compile_the_world_counter = 0; static int _codecache_sweep_counter = 0; + // Filter out all exceptions except OOMs + static void clear_pending_exception_if_not_oom(TRAPS) { + if (HAS_PENDING_EXCEPTION && + !PENDING_EXCEPTION->is_a(SystemDictionary::OutOfMemoryError_klass())) { + CLEAR_PENDING_EXCEPTION; + } + // The CHECK at the caller will propagate the exception out + } + void ClassLoader::compile_the_world_in(char* name, Handle loader, TRAPS) { int len = (int)strlen(name); if (len > 6 && strcmp(".class", name + len - 6) == 0) { // We have a .class file char buffer[2048];
*** 1310,1325 **** instanceKlassHandle k (THREAD, ik); if (k.not_null() && !HAS_PENDING_EXCEPTION) { k->initialize(THREAD); } bool exception_occurred = HAS_PENDING_EXCEPTION; ! CLEAR_PENDING_EXCEPTION; if (CompileTheWorldPreloadClasses && k.not_null()) { constantPoolKlass::preload_and_initialize_all_classes(k->constants(), THREAD); if (HAS_PENDING_EXCEPTION) { // If something went wrong in preloading we just ignore it ! CLEAR_PENDING_EXCEPTION; tty->print_cr("Preloading failed for (%d) %s", _compile_the_world_counter, buffer); } } if (_compile_the_world_counter >= CompileTheWorldStartAt) { --- 1319,1334 ---- instanceKlassHandle k (THREAD, ik); if (k.not_null() && !HAS_PENDING_EXCEPTION) { k->initialize(THREAD); } bool exception_occurred = HAS_PENDING_EXCEPTION; ! clear_pending_exception_if_not_oom(CHECK); if (CompileTheWorldPreloadClasses && k.not_null()) { constantPoolKlass::preload_and_initialize_all_classes(k->constants(), THREAD); if (HAS_PENDING_EXCEPTION) { // If something went wrong in preloading we just ignore it ! clear_pending_exception_if_not_oom(CHECK); tty->print_cr("Preloading failed for (%d) %s", _compile_the_world_counter, buffer); } } if (_compile_the_world_counter >= CompileTheWorldStartAt) {
*** 1342,1352 **** } // Force compilation CompileBroker::compile_method(m, InvocationEntryBci, CompLevel_initial_compile, methodHandle(), 0, "CTW", THREAD); if (HAS_PENDING_EXCEPTION) { ! CLEAR_PENDING_EXCEPTION; tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_counter, m->name()->as_C_string()); } if (TieredCompilation) { // Clobber the first compile and force second tier compilation nmethod* nm = m->code(); --- 1351,1361 ---- } // Force compilation CompileBroker::compile_method(m, InvocationEntryBci, CompLevel_initial_compile, methodHandle(), 0, "CTW", THREAD); if (HAS_PENDING_EXCEPTION) { ! clear_pending_exception_if_not_oom(CHECK); tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_counter, m->name()->as_C_string()); } if (TieredCompilation) { // Clobber the first compile and force second tier compilation nmethod* nm = m->code();
*** 1356,1366 **** m->clear_code(); } CompileBroker::compile_method(m, InvocationEntryBci, CompLevel_full_optimization, methodHandle(), 0, "CTW", THREAD); if (HAS_PENDING_EXCEPTION) { ! CLEAR_PENDING_EXCEPTION; tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_counter, m->name()->as_C_string()); } } } --- 1365,1375 ---- m->clear_code(); } CompileBroker::compile_method(m, InvocationEntryBci, CompLevel_full_optimization, methodHandle(), 0, "CTW", THREAD); if (HAS_PENDING_EXCEPTION) { ! clear_pending_exception_if_not_oom(CHECK); tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_counter, m->name()->as_C_string()); } } }
src/share/vm/classfile/classLoader.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File