hotspot/src/share/vm/runtime/thread.hpp
changeset 28039 bf5a8340bf8a
parent 27917 c5937f7b4e8b
child 29321 b7582a690cb9
child 29326 ebaa169c6dc3
child 29185 41cf0610fedf
--- a/hotspot/src/share/vm/runtime/thread.hpp	Fri Dec 05 15:16:01 2014 +0100
+++ b/hotspot/src/share/vm/runtime/thread.hpp	Tue Nov 25 17:33:59 2014 +0100
@@ -908,6 +908,12 @@
   // This is set to popframe_pending to signal that top Java frame should be popped immediately
   int _popframe_condition;
 
+  // If reallocation of scalar replaced objects fails, we throw OOM
+  // and during exception propagation, pop the top
+  // _frames_to_pop_failed_realloc frames, the ones that reference
+  // failed reallocations.
+  int _frames_to_pop_failed_realloc;
+
 #ifndef PRODUCT
   int _jmp_ring_index;
   struct {
@@ -1567,6 +1573,10 @@
   void clr_pop_frame_in_process(void)                 { _popframe_condition &= ~popframe_processing_bit; }
 #endif
 
+  int frames_to_pop_failed_realloc() const            { return _frames_to_pop_failed_realloc; }
+  void set_frames_to_pop_failed_realloc(int nb)       { _frames_to_pop_failed_realloc = nb; }
+  void dec_frames_to_pop_failed_realloc()             { _frames_to_pop_failed_realloc--; }
+
  private:
   // Saved incoming arguments to popped frame.
   // Used only when popped interpreted frame returns to deoptimized frame.