src/share/vm/compiler/compileBroker.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/compiler/compileBroker.cpp Fri Nov 8 14:10:12 2013
--- new/src/share/vm/compiler/compileBroker.cpp Fri Nov 8 14:10:12 2013
*** 123,132 ****
--- 123,133 ----
#define DTRACE_METHOD_COMPILE_END_PROBE(method, comp_name, success)
#endif // ndef DTRACE_ENABLED
bool CompileBroker::_initialized = false;
+ int CompileBroker::_compilation_warning_counter = -1;
volatile bool CompileBroker::_should_block = false;
volatile jint CompileBroker::_should_compile_new_jobs = run_compilation;
// The installed compiler(s)
AbstractCompiler* CompileBroker::_compilers[2];
*** 2025,2039 ****
--- 2026,2039 ----
vm_exit(0);
}
#endif
}
// ------------------------------------------------------------------
// 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.
+ /**
+ * 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;
*** 2046,2057 ****
--- 2046,2067 ----
xtty->begin_elem("code_cache_full");
xtty->print(s.as_string());
xtty->stamp();
xtty->end_elem();
}
+
+ // Increase counter only if compilation is enabled.
+ if (should_compile_new_jobs()) {
+ _compilation_warning_counter++;
+ }
+
+ if (should_print_compiler_warning()) {
warning("CodeCache is full. Compiler has been disabled.");
warning("Try increasing the code cache size using -XX:ReservedCodeCacheSize=");
+ warning("(Printing one such message for every 10th event)");
+ codecache_print(/* detailed= */ true);
+ }
CodeCache::report_codemem_full();
#ifndef PRODUCT
*** 2064,2084 ****
--- 2074,2092 ----
#endif
if (UseCodeCacheFlushing) {
// Since code cache is full, immediately stop new compiles
if (CompileBroker::set_should_compile_new_jobs(CompileBroker::stop_compilation)) {
NMethodSweeper::log_sweep("disable_compiler");
+ }
// Switch to 'vm_state'. This ensures that possibly_sweep() can be called
// without having to consider the state in which the current thread is.
ThreadInVMfromUnknown in_vm;
NMethodSweeper::possibly_sweep();
}
} else {
disable_compilation_forever();
}
}
codecache_print(/* detailed= */ true);
}
// ------------------------------------------------------------------
// CompileBroker::set_last_compile
//
src/share/vm/compiler/compileBroker.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File