changeset 9192:9f614da5f371

8080157: assert(allocates2(pc)) failed: not in CodeBuffer memory Summary: increase code_size2 for stubs Reviewed-by: iveresov
author kvn
date Fri, 19 Jun 2015 17:46:42 -0700
parents 7e0a4478e80f
children 657162a310c4
files src/cpu/x86/vm/stubRoutines_x86_64.hpp src/share/vm/runtime/stubRoutines.cpp
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/x86/vm/stubRoutines_x86_64.hpp	Thu Feb 14 14:31:32 2019 +0100
+++ b/src/cpu/x86/vm/stubRoutines_x86_64.hpp	Fri Jun 19 17:46:42 2015 -0700
@@ -33,7 +33,7 @@
 
 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 {
--- a/src/share/vm/runtime/stubRoutines.cpp	Thu Feb 14 14:31:32 2019 +0100
+++ b/src/share/vm/runtime/stubRoutines.cpp	Fri Jun 19 17:46:42 2015 -0700
@@ -174,6 +174,9 @@
     }
     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 @@
     }
     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