src/share/vm/compiler/compileBroker.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
8015774 Cdiff src/share/vm/compiler/compileBroker.cpp
src/share/vm/compiler/compileBroker.cpp
Print this page
*** 1741,1753 ****
// space in the code cache to generate the necessary stubs, etc.
while (!is_compilation_disabled_forever()) {
// 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();
}
CompileTask* task = queue->get();
if (task == NULL) {
continue;
--- 1741,1755 ----
// space in the code cache to generate the necessary stubs, etc.
while (!is_compilation_disabled_forever()) {
// We need this HandleMark to avoid leaking VM handles.
HandleMark hm(thread);
! // Check if the CodeCache is full
! int code_blob_type = 0;
! if (CodeCache::is_full(&code_blob_type)) {
! // The CodeHeap for code_blob_type is really full
! handle_full_code_cache(code_blob_type);
}
CompileTask* task = queue->get();
if (task == NULL) {
continue;
*** 2073,2083 ****
/**
* 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() {
UseInterpreter = true;
if (UseCompiler || AlwaysCompileLoopMethods ) {
if (xtty != NULL) {
ResourceMark rm;
stringStream s;
--- 2075,2085 ----
/**
* 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(int code_blob_type) {
UseInterpreter = true;
if (UseCompiler || AlwaysCompileLoopMethods ) {
if (xtty != NULL) {
ResourceMark rm;
stringStream s;
*** 2090,2101 ****
xtty->print("%s", s.as_string());
xtty->stamp();
xtty->end_elem();
}
- CodeCache::report_codemem_full();
-
#ifndef PRODUCT
if (CompileTheWorld || ExitOnFullCodeCache) {
codecache_print(/* detailed= */ true);
before_exit(JavaThread::current());
exit_globals(); // will delete tty
--- 2092,2101 ----
*** 2113,2128 ****
NMethodSweeper::possibly_sweep();
} else {
disable_compilation_forever();
}
! // Print warning only once
! if (should_print_compiler_warning()) {
! warning("CodeCache is full. Compiler has been disabled.");
! warning("Try increasing the code cache size using -XX:ReservedCodeCacheSize=");
! codecache_print(/* detailed= */ true);
! }
}
}
// ------------------------------------------------------------------
// CompileBroker::set_last_compile
--- 2113,2123 ----
NMethodSweeper::possibly_sweep();
} else {
disable_compilation_forever();
}
! CodeCache::report_codemem_full(code_blob_type, should_print_compiler_warning());
}
}
// ------------------------------------------------------------------
// CompileBroker::set_last_compile
src/share/vm/compiler/compileBroker.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File