src/share/vm/runtime/vframeArray.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 









  25 // A vframeArray is an array used for momentarily storing off stack Java method activations
  26 // during deoptimization. Essentially it is an array of vframes where each vframe
  27 // data is stored off stack. This structure will never exist across a safepoint so
  28 // there is no need to gc any oops that are stored in the structure.
  29 
  30 
  31 class LocalsClosure;
  32 class ExpressionStackClosure;
  33 class MonitorStackClosure;
  34 class MonitorArrayElement;
  35 class StackValueCollection;
  36 
  37 // A vframeArrayElement is an element of a vframeArray. Each element
  38 // represent an interpreter frame which will eventually be created.
  39 
  40 class vframeArrayElement : public _ValueObj {
  41   private:
  42 
  43     frame _frame;                                                // the interpreter frame we will unpack into
  44     int  _bci;                                                   // raw bci for this vframe


 184   void unpack_to_stack(frame &unpack_frame, int exec_mode);
 185 
 186   // Deallocates monitor chunks allocated during deoptimization.
 187   // This should be called when the array is not used anymore.
 188   void deallocate_monitor_chunks();
 189 
 190 
 191 
 192   // Accessor for register map
 193   address register_location(int i) const;
 194 
 195   void print_on_2(outputStream* st) PRODUCT_RETURN;
 196   void print_value_on(outputStream* st) const PRODUCT_RETURN;
 197 
 198 #ifndef PRODUCT
 199   // Comparing
 200   bool structural_compare(JavaThread* thread, GrowableArray<compiledVFrame*>* chunk);
 201 #endif
 202 
 203 };


   1 /*
   2  * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_VFRAMEARRAY_HPP
  26 #define SHARE_VM_RUNTIME_VFRAMEARRAY_HPP
  27 
  28 #include "oops/arrayOop.hpp"
  29 #include "runtime/deoptimization.hpp"
  30 #include "runtime/frame.inline.hpp"
  31 #include "runtime/monitorChunk.hpp"
  32 #include "utilities/growableArray.hpp"
  33 
  34 // A vframeArray is an array used for momentarily storing off stack Java method activations
  35 // during deoptimization. Essentially it is an array of vframes where each vframe
  36 // data is stored off stack. This structure will never exist across a safepoint so
  37 // there is no need to gc any oops that are stored in the structure.
  38 
  39 
  40 class LocalsClosure;
  41 class ExpressionStackClosure;
  42 class MonitorStackClosure;
  43 class MonitorArrayElement;
  44 class StackValueCollection;
  45 
  46 // A vframeArrayElement is an element of a vframeArray. Each element
  47 // represent an interpreter frame which will eventually be created.
  48 
  49 class vframeArrayElement : public _ValueObj {
  50   private:
  51 
  52     frame _frame;                                                // the interpreter frame we will unpack into
  53     int  _bci;                                                   // raw bci for this vframe


 193   void unpack_to_stack(frame &unpack_frame, int exec_mode);
 194 
 195   // Deallocates monitor chunks allocated during deoptimization.
 196   // This should be called when the array is not used anymore.
 197   void deallocate_monitor_chunks();
 198 
 199 
 200 
 201   // Accessor for register map
 202   address register_location(int i) const;
 203 
 204   void print_on_2(outputStream* st) PRODUCT_RETURN;
 205   void print_value_on(outputStream* st) const PRODUCT_RETURN;
 206 
 207 #ifndef PRODUCT
 208   // Comparing
 209   bool structural_compare(JavaThread* thread, GrowableArray<compiledVFrame*>* chunk);
 210 #endif
 211 
 212 };
 213 
 214 #endif // SHARE_VM_RUNTIME_VFRAMEARRAY_HPP