src/share/vm/runtime/sharedRuntime.cpp
Print this page
rev 1083 : code cache unloading for webrev 091214
rev 1085 : checkpoint unloading changes on 100107
@@ -1901,23 +1901,12 @@
}
if (B == NULL) {
// CodeCache is full, disable compilation
// Ought to log this but compile log is only per compile thread
// and we're some non descript Java thread.
- UseInterpreter = true;
- if (UseCompiler || AlwaysCompileLoopMethods ) {
-#ifndef PRODUCT
- warning("CodeCache is full. Compiler has been disabled");
- if (CompileTheWorld || ExitOnFullCodeCache) {
- before_exit(JavaThread::current());
- exit_globals(); // will delete tty
- vm_direct_exit(CompileTheWorld ? 0 : 1);
- }
-#endif
- UseCompiler = false;
- AlwaysCompileLoopMethods = false;
- }
+ MutexUnlocker mu(AdapterHandlerLibrary_lock);
+ CompileBroker::handle_full_code_cache();
return 0; // Out of CodeCache space (_handlers[0] == NULL)
}
entry->relocate(B->instructions_begin());
#ifndef PRODUCT
// debugging suppport
@@ -2042,23 +2031,12 @@
nm->post_compiled_method_load_event();
} else {
// CodeCache is full, disable compilation
// Ought to log this but compile log is only per compile thread
// and we're some non descript Java thread.
- UseInterpreter = true;
- if (UseCompiler || AlwaysCompileLoopMethods ) {
-#ifndef PRODUCT
- warning("CodeCache is full. Compiler has been disabled");
- if (CompileTheWorld || ExitOnFullCodeCache) {
- before_exit(JavaThread::current());
- exit_globals(); // will delete tty
- vm_direct_exit(CompileTheWorld ? 0 : 1);
- }
-#endif
- UseCompiler = false;
- AlwaysCompileLoopMethods = false;
- }
+ MutexUnlocker mu(AdapterHandlerLibrary_lock);
+ CompileBroker::handle_full_code_cache();
}
return nm;
}
#ifdef HAVE_DTRACE_H