1.1 --- a/src/share/vm/runtime/stubRoutines.cpp Thu Feb 14 14:31:32 2019 +0100 1.2 +++ b/src/share/vm/runtime/stubRoutines.cpp Fri Jun 19 17:46:42 2015 -0700 1.3 @@ -174,6 +174,9 @@ 1.4 } 1.5 CodeBuffer buffer(_code1); 1.6 StubGenerator_generate(&buffer, false); 1.7 + // When new stubs added we need to make sure there is some space left 1.8 + // to catch situation when we should increase size again. 1.9 + assert(buffer.insts_remaining() > 200, "increase code_size1"); 1.10 } 1.11 } 1.12 1.13 @@ -226,6 +229,9 @@ 1.14 } 1.15 CodeBuffer buffer(_code2); 1.16 StubGenerator_generate(&buffer, true); 1.17 + // When new stubs added we need to make sure there is some space left 1.18 + // to catch situation when we should increase size again. 1.19 + assert(buffer.insts_remaining() > 200, "increase code_size2"); 1.20 } 1.21 1.22 #ifdef ASSERT