8133951: Zero interpreter asserts in stubRoutines.cpp

Thu, 20 Aug 2015 11:18:51 -0400

author
coleenp
date
Thu, 20 Aug 2015 11:18:51 -0400
changeset 9774
4a7da2a46cb1
parent 9773
dc471edac21e
child 9775
9b865b281711

8133951: Zero interpreter asserts in stubRoutines.cpp
Summary: Allow zero sized code buffer when checking if there's enough remaining size
Reviewed-by: kvn

src/share/vm/runtime/stubRoutines.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/runtime/stubRoutines.cpp	Thu Oct 31 19:36:58 2019 +0100
     1.2 +++ b/src/share/vm/runtime/stubRoutines.cpp	Thu Aug 20 11:18:51 2015 -0400
     1.3 @@ -176,7 +176,7 @@
     1.4      StubGenerator_generate(&buffer, false);
     1.5      // When new stubs added we need to make sure there is some space left
     1.6      // to catch situation when we should increase size again.
     1.7 -    assert(buffer.insts_remaining() > 200, "increase code_size1");
     1.8 +    assert(code_size1 == 0 || buffer.insts_remaining() > 200, "increase code_size1");
     1.9    }
    1.10  }
    1.11  
    1.12 @@ -231,7 +231,7 @@
    1.13      StubGenerator_generate(&buffer, true);
    1.14      // When new stubs added we need to make sure there is some space left
    1.15      // to catch situation when we should increase size again.
    1.16 -    assert(buffer.insts_remaining() > 200, "increase code_size2");
    1.17 +    assert(code_size2 == 0 || buffer.insts_remaining() > 200, "increase code_size2");
    1.18    }
    1.19  
    1.20  #ifdef ASSERT

mercurial