src/share/vm/runtime/vframe.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2014, 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  *


 118   // Deoptimize first if necessary.
 119   virtual void set_locals(StackValueCollection* values) const = 0;
 120 
 121   // Test operation
 122   bool is_java_frame() const { return true; }
 123 
 124  protected:
 125   javaVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread) : vframe(fr, reg_map, thread) {}
 126   javaVFrame(const frame* fr, JavaThread* thread) : vframe(fr, thread) {}
 127 
 128  public:
 129   // casting
 130   static javaVFrame* cast(vframe* vf) {
 131     assert(vf == NULL || vf->is_java_frame(), "must be java frame");
 132     return (javaVFrame*) vf;
 133   }
 134 
 135   // Return an array of monitors locked by this frame in the youngest to oldest order
 136   GrowableArray<MonitorInfo*>* locked_monitors();
 137 
 138   // printing used during stack dumps

 139   void print_lock_info_on(outputStream* st, int frame_count);
 140   void print_lock_info(int frame_count) { print_lock_info_on(tty, frame_count); }
 141 
 142 #ifndef PRODUCT
 143  public:
 144   // printing operations
 145   void print();
 146   void print_value() const;
 147   void print_activation(int index) const;
 148 
 149   // verify operations
 150   virtual void verify() const;
 151 
 152   // Structural compare
 153   bool structural_compare(javaVFrame* other);
 154 #endif
 155   friend class vframe;
 156 };
 157 
 158 class interpretedVFrame: public javaVFrame {


   1 /*
   2  * Copyright (c) 1997, 2015, 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  *


 118   // Deoptimize first if necessary.
 119   virtual void set_locals(StackValueCollection* values) const = 0;
 120 
 121   // Test operation
 122   bool is_java_frame() const { return true; }
 123 
 124  protected:
 125   javaVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread) : vframe(fr, reg_map, thread) {}
 126   javaVFrame(const frame* fr, JavaThread* thread) : vframe(fr, thread) {}
 127 
 128  public:
 129   // casting
 130   static javaVFrame* cast(vframe* vf) {
 131     assert(vf == NULL || vf->is_java_frame(), "must be java frame");
 132     return (javaVFrame*) vf;
 133   }
 134 
 135   // Return an array of monitors locked by this frame in the youngest to oldest order
 136   GrowableArray<MonitorInfo*>* locked_monitors();
 137 
 138   // printing used during stack dumps and diagnostics
 139   static void print_locked_object_class_name(outputStream* st, Handle obj, const char* lock_state);
 140   void print_lock_info_on(outputStream* st, int frame_count);
 141   void print_lock_info(int frame_count) { print_lock_info_on(tty, frame_count); }
 142 
 143 #ifndef PRODUCT
 144  public:
 145   // printing operations
 146   void print();
 147   void print_value() const;
 148   void print_activation(int index) const;
 149 
 150   // verify operations
 151   virtual void verify() const;
 152 
 153   // Structural compare
 154   bool structural_compare(javaVFrame* other);
 155 #endif
 156   friend class vframe;
 157 };
 158 
 159 class interpretedVFrame: public javaVFrame {