diff --git a/src/hotspot/cpu/x86/stubDeclarations_x86.hpp b/src/hotspot/cpu/x86/stubDeclarations_x86.hpp index ae947135f78c2..30a93fa49174d 100644 --- a/src/hotspot/cpu/x86/stubDeclarations_x86.hpp +++ b/src/hotspot/cpu/x86/stubDeclarations_x86.hpp @@ -37,7 +37,7 @@ do_arch_blob, \ do_arch_entry, \ do_arch_entry_init) \ - do_arch_blob(initial, 20000 WINDOWS_ONLY(+1000)) \ + do_arch_blob(initial, PRODUCT_ONLY(20000) NOT_PRODUCT(21000) WINDOWS_ONLY(+1000)) \ do_stub(initial, verify_mxcsr) \ do_arch_entry(x86, initial, verify_mxcsr, verify_mxcsr_entry, \ verify_mxcsr_entry) \ diff --git a/src/hotspot/share/runtime/stubRoutines.cpp b/src/hotspot/share/runtime/stubRoutines.cpp index 2c50fe5091523..939caeafb6632 100644 --- a/src/hotspot/share/runtime/stubRoutines.cpp +++ b/src/hotspot/share/runtime/stubRoutines.cpp @@ -156,9 +156,6 @@ static BufferBlob* initialize_stubs(BlobId blob_id, } CodeBuffer buffer(stubs_code); StubGenerator_generate(&buffer, blob_id); - // When new stubs added we need to make sure there is some space left - // to catch situation when we should increase size again. - assert(code_size == 0 || buffer.insts_remaining() > 200, "increase %s", assert_msg); LogTarget(Info, stubs) lt; if (lt.is_enabled()) { @@ -167,6 +164,11 @@ static BufferBlob* initialize_stubs(BlobId blob_id, buffer_name, p2i(stubs_code->content_begin()), p2i(stubs_code->content_end()), buffer.total_content_size(), buffer.insts_remaining()); } + + // When new stubs added we need to make sure there is some space left + // to catch situation when we should increase size again. + assert(code_size == 0 || buffer.insts_remaining() > 200, "increase %s", assert_msg); + return stubs_code; }