6848466: frame::frame_size() assertion failure with -XX:+DebugDeoptimization
authorcfang
Fri, 05 Jun 2009 10:25:39 -0700
changeset 2880 c2974244a496
parent 2879 537a4af47ca7
child 2887 b003d950922a
child 3171 aa289b22b577
6848466: frame::frame_size() assertion failure with -XX:+DebugDeoptimization Summary: add a RegisterMap* argument to frame::frame_size() to correctly compute the sender frame Reviewed-by: never
hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp
hotspot/src/cpu/x86/vm/frame_x86.cpp
hotspot/src/share/vm/runtime/frame.hpp
hotspot/src/share/vm/runtime/vframe.cpp
--- a/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp	Wed Jun 03 18:15:25 2009 -0700
+++ b/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp	Fri Jun 05 10:25:39 2009 -0700
@@ -59,7 +59,7 @@
 inline bool frame::is_older(intptr_t* id) const   { assert(this->id() != NULL && id != NULL, "NULL frame id");
                                                     return this->id() > id ; }
 
-inline int frame::frame_size() const { return sender_sp() - sp(); }
+inline int frame::frame_size(RegisterMap* map) const { return sender_sp() - sp(); }
 
 inline intptr_t* frame::link() const { return (intptr_t *)(fp()[FP->sp_offset_in_saved_window()] + STACK_BIAS); }
 
--- a/hotspot/src/cpu/x86/vm/frame_x86.cpp	Wed Jun 03 18:15:25 2009 -0700
+++ b/hotspot/src/cpu/x86/vm/frame_x86.cpp	Fri Jun 05 10:25:39 2009 -0700
@@ -237,9 +237,8 @@
   return Interpreter::contains(pc());
 }
 
-int frame::frame_size() const {
-  RegisterMap map(JavaThread::current(), false);
-  frame sender = this->sender(&map);
+int frame::frame_size(RegisterMap* map) const {
+  frame sender = this->sender(map);
   return sender.sp() - sp();
 }
 
--- a/hotspot/src/share/vm/runtime/frame.hpp	Wed Jun 03 18:15:25 2009 -0700
+++ b/hotspot/src/share/vm/runtime/frame.hpp	Fri Jun 05 10:25:39 2009 -0700
@@ -117,7 +117,7 @@
   bool can_be_deoptimized() const;
 
   // returns the frame size in stack slots
-  int frame_size() const;
+  int frame_size(RegisterMap* map) const;
 
   // returns the sending frame
   frame sender(RegisterMap* map) const;
--- a/hotspot/src/share/vm/runtime/vframe.cpp	Wed Jun 03 18:15:25 2009 -0700
+++ b/hotspot/src/share/vm/runtime/vframe.cpp	Fri Jun 05 10:25:39 2009 -0700
@@ -559,7 +559,8 @@
   }
   // Check frame size and print warning if it looks suspiciously large
   if (fr().sp() != NULL) {
-    uint size = fr().frame_size();
+    RegisterMap map = *register_map();
+    uint size = fr().frame_size(&map);
 #ifdef _LP64
     if (size > 8*K) warning("SUSPICIOUSLY LARGE FRAME (%d)", size);
 #else