Mercurial > hg > graal-compiler
diff src/share/vm/compiler/compileBroker.cpp @ 2353:1c0cf339481b
7025742: Can not use CodeCache::unallocated_capacity() with fragmented CodeCache
Summary: Use largest_free_block() instead of unallocated_capacity().
Reviewed-by: iveresov, never, ysr
author | kvn |
---|---|
date | Wed, 09 Mar 2011 09:15:16 -0800 |
parents | 850b2295a494 |
children | 1927db75dd85 |
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.cpp Sun Mar 06 22:09:23 2011 -0800 +++ b/src/share/vm/compiler/compileBroker.cpp Wed Mar 09 09:15:16 2011 -0800 @@ -1364,7 +1364,7 @@ // We need this HandleMark to avoid leaking VM handles. HandleMark hm(thread); - if (CodeCache::unallocated_capacity() < CodeCacheMinimumFreeSpace) { + if (CodeCache::largest_free_block() < CodeCacheMinimumFreeSpace) { // the code cache is really full handle_full_code_cache(); } else if (UseCodeCacheFlushing && CodeCache::needs_flushing()) { @@ -1645,11 +1645,13 @@ if (UseCompiler || AlwaysCompileLoopMethods ) { if (xtty != NULL) { xtty->begin_elem("code_cache_full"); + CodeCache::log_state(xtty); xtty->stamp(); xtty->end_elem(); } warning("CodeCache is full. Compiler has been disabled."); warning("Try increasing the code cache size using -XX:ReservedCodeCacheSize="); + CodeCache::print_bounds(tty); #ifndef PRODUCT if (CompileTheWorld || ExitOnFullCodeCache) { before_exit(JavaThread::current());