8133951: Zero interpreter asserts in stubRoutines.cpp
authorcoleenp
Thu, 20 Aug 2015 11:18:51 -0400
changeset 32384 d28b2b792dba
parent 32364 be09a00c9e75
child 32385 c5b89c29f5b4
8133951: Zero interpreter asserts in stubRoutines.cpp Summary: Allow zero sized code buffer when checking if there's enough remaining size Reviewed-by: kvn
hotspot/src/share/vm/runtime/stubRoutines.cpp
--- a/hotspot/src/share/vm/runtime/stubRoutines.cpp	Mon Aug 17 10:53:11 2015 +0000
+++ b/hotspot/src/share/vm/runtime/stubRoutines.cpp	Thu Aug 20 11:18:51 2015 -0400
@@ -181,7 +181,7 @@
     StubGenerator_generate(&buffer, false);
     // When new stubs added we need to make sure there is some space left
     // to catch situation when we should increase size again.
-    assert(buffer.insts_remaining() > 200, "increase code_size1");
+    assert(code_size1 == 0 || buffer.insts_remaining() > 200, "increase code_size1");
   }
 }
 
@@ -274,7 +274,7 @@
     StubGenerator_generate(&buffer, true);
     // When new stubs added we need to make sure there is some space left
     // to catch situation when we should increase size again.
-    assert(buffer.insts_remaining() > 200, "increase code_size2");
+    assert(code_size2 == 0 || buffer.insts_remaining() > 200, "increase code_size2");
   }
 
 #ifdef ASSERT