diff --git a/src/cpu/x86/vm/stubRoutines_x86_64.hpp b/src/cpu/x86/vm/stubRoutines_x86_64.hpp index 15922b8aedc173d98546dfde6f17b5c6b954db31..b048fd74e0a4467a7928048201e1361f909c0eee 100644 --- a/src/cpu/x86/vm/stubRoutines_x86_64.hpp +++ b/src/cpu/x86/vm/stubRoutines_x86_64.hpp @@ -33,7 +33,7 @@ static bool returns_to_call_stub(address return_pc) { return return_pc == _ enum platform_dependent_constants { code_size1 = 19000, // simply increase if too small (assembler will crash if too small) - code_size2 = 23000 // simply increase if too small (assembler will crash if too small) + code_size2 = 24000 // simply increase if too small (assembler will crash if too small) }; class x86 { diff --git a/src/share/vm/runtime/stubRoutines.cpp b/src/share/vm/runtime/stubRoutines.cpp index eb30640345db8584c6528f187a4e1e035dc0751d..6b8f7e75466e2a26825e9b277539b9562be96c2d 100644 --- a/src/share/vm/runtime/stubRoutines.cpp +++ b/src/share/vm/runtime/stubRoutines.cpp @@ -174,6 +174,9 @@ void StubRoutines::initialize1() { } CodeBuffer buffer(_code1); 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"); } } @@ -226,6 +229,9 @@ void StubRoutines::initialize2() { } CodeBuffer buffer(_code2); 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"); } #ifdef ASSERT