Mercurial > hg > truffle
diff src/share/vm/runtime/sharedRuntime.cpp @ 12294:891687731b59
7009641: Don't fail VM when CodeCache is full
Summary: Allocation in the code cache returns NULL instead of failing the entire VM
Reviewed-by: kvn, iveresov
author | anoll |
---|---|
date | Tue, 24 Sep 2013 15:56:25 +0200 |
parents | f98f5d48f511 |
children | a5ac0873476c |
line wrap: on
line diff
--- a/src/share/vm/runtime/sharedRuntime.cpp Fri Sep 20 11:17:04 2013 -0700 +++ b/src/share/vm/runtime/sharedRuntime.cpp Tue Sep 24 15:56:25 2013 +0200 @@ -1506,8 +1506,11 @@ info, CHECK_(methodHandle())); inline_cache->set_to_monomorphic(info); } else if (!inline_cache->is_megamorphic() && !inline_cache->is_clean()) { - // Change to megamorphic - inline_cache->set_to_megamorphic(&call_info, bc, CHECK_(methodHandle())); + // Potential change to megamorphic + bool successful = inline_cache->set_to_megamorphic(&call_info, bc, CHECK_(methodHandle())); + if (!successful) { + inline_cache->set_to_clean(); + } } else { // Either clean or megamorphic }