src/share/vm/runtime/thread.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7009361 Sdiff src/share/vm/runtime

src/share/vm/runtime/thread.cpp

Print this page




  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 #include "precompiled.hpp"
  26 #include "classfile/classLoader.hpp"
  27 #include "classfile/javaClasses.hpp"
  28 #include "classfile/systemDictionary.hpp"
  29 #include "classfile/vmSymbols.hpp"
  30 #include "code/scopeDesc.hpp"
  31 #include "compiler/compileBroker.hpp"
  32 #include "interpreter/interpreter.hpp"
  33 #include "interpreter/linkResolver.hpp"

  34 #include "jvmtifiles/jvmtiEnv.hpp"
  35 #include "memory/oopFactory.hpp"
  36 #include "memory/universe.inline.hpp"
  37 #include "oops/instanceKlass.hpp"
  38 #include "oops/objArrayOop.hpp"
  39 #include "oops/oop.inline.hpp"
  40 #include "oops/symbol.hpp"
  41 #include "prims/jvm_misc.hpp"
  42 #include "prims/jvmtiExport.hpp"
  43 #include "prims/jvmtiThreadState.hpp"
  44 #include "prims/privilegedStack.hpp"
  45 #include "runtime/aprofiler.hpp"
  46 #include "runtime/arguments.hpp"
  47 #include "runtime/biasedLocking.hpp"
  48 #include "runtime/deoptimization.hpp"
  49 #include "runtime/fprofiler.hpp"
  50 #include "runtime/frame.inline.hpp"
  51 #include "runtime/init.hpp"
  52 #include "runtime/interfaceSupport.hpp"
  53 #include "runtime/java.hpp"


2841 }
2842 
2843 void JavaThread::popframe_free_preserved_args() {
2844   assert(_popframe_preserved_args != NULL, "should not free PopFrame preserved arguments twice");
2845   FREE_C_HEAP_ARRAY(char, (char*) _popframe_preserved_args);
2846   _popframe_preserved_args = NULL;
2847   _popframe_preserved_args_size = 0;
2848 }
2849 
2850 #ifndef PRODUCT
2851 
2852 void JavaThread::trace_frames() {
2853   tty->print_cr("[Describe stack]");
2854   int frame_no = 1;
2855   for(StackFrameStream fst(this); !fst.is_done(); fst.next()) {
2856     tty->print("  %d. ", frame_no++);
2857     fst.current()->print_value_on(tty,this);
2858     tty->cr();
2859   }
2860 }



















2861 
2862 
2863 void JavaThread::trace_stack_from(vframe* start_vf) {
2864   ResourceMark rm;
2865   int vframe_no = 1;
2866   for (vframe* f = start_vf; f; f = f->sender() ) {
2867     if (f->is_java_frame()) {
2868       javaVFrame::cast(f)->print_activation(vframe_no++);
2869     } else {
2870       f->print();
2871     }
2872     if (vframe_no > StackPrintLimit) {
2873       tty->print_cr("...<more frames>...");
2874       return;
2875     }
2876   }
2877 }
2878 
2879 
2880 void JavaThread::trace_stack() {




  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 #include "precompiled.hpp"
  26 #include "classfile/classLoader.hpp"
  27 #include "classfile/javaClasses.hpp"
  28 #include "classfile/systemDictionary.hpp"
  29 #include "classfile/vmSymbols.hpp"
  30 #include "code/scopeDesc.hpp"
  31 #include "compiler/compileBroker.hpp"
  32 #include "interpreter/interpreter.hpp"
  33 #include "interpreter/linkResolver.hpp"
  34 #include "interpreter/oopMapCache.hpp"
  35 #include "jvmtifiles/jvmtiEnv.hpp"
  36 #include "memory/oopFactory.hpp"
  37 #include "memory/universe.inline.hpp"
  38 #include "oops/instanceKlass.hpp"
  39 #include "oops/objArrayOop.hpp"
  40 #include "oops/oop.inline.hpp"
  41 #include "oops/symbol.hpp"
  42 #include "prims/jvm_misc.hpp"
  43 #include "prims/jvmtiExport.hpp"
  44 #include "prims/jvmtiThreadState.hpp"
  45 #include "prims/privilegedStack.hpp"
  46 #include "runtime/aprofiler.hpp"
  47 #include "runtime/arguments.hpp"
  48 #include "runtime/biasedLocking.hpp"
  49 #include "runtime/deoptimization.hpp"
  50 #include "runtime/fprofiler.hpp"
  51 #include "runtime/frame.inline.hpp"
  52 #include "runtime/init.hpp"
  53 #include "runtime/interfaceSupport.hpp"
  54 #include "runtime/java.hpp"


2842 }
2843 
2844 void JavaThread::popframe_free_preserved_args() {
2845   assert(_popframe_preserved_args != NULL, "should not free PopFrame preserved arguments twice");
2846   FREE_C_HEAP_ARRAY(char, (char*) _popframe_preserved_args);
2847   _popframe_preserved_args = NULL;
2848   _popframe_preserved_args_size = 0;
2849 }
2850 
2851 #ifndef PRODUCT
2852 
2853 void JavaThread::trace_frames() {
2854   tty->print_cr("[Describe stack]");
2855   int frame_no = 1;
2856   for(StackFrameStream fst(this); !fst.is_done(); fst.next()) {
2857     tty->print("  %d. ", frame_no++);
2858     fst.current()->print_value_on(tty,this);
2859     tty->cr();
2860   }
2861 }
2862 
2863 
2864 // Print or validate the layout of stack frames
2865 void JavaThread::print_frame_layout(int depth, bool validate_only) {
2866   ResourceMark rm;
2867   PRESERVE_EXCEPTION_MARK;
2868   FrameValues values;
2869   int frame_no = 0;
2870   for(StackFrameStream fst(this, false); !fst.is_done(); fst.next()) {
2871     fst.current()->describe(values, ++frame_no);
2872     if (depth == frame_no) break;
2873   }
2874   if (validate_only) {
2875     values.validate();
2876   } else {
2877     tty->print_cr("[Describe stack layout]");
2878     values.print();
2879   }
2880 }
2881 
2882 
2883 void JavaThread::trace_stack_from(vframe* start_vf) {
2884   ResourceMark rm;
2885   int vframe_no = 1;
2886   for (vframe* f = start_vf; f; f = f->sender() ) {
2887     if (f->is_java_frame()) {
2888       javaVFrame::cast(f)->print_activation(vframe_no++);
2889     } else {
2890       f->print();
2891     }
2892     if (vframe_no > StackPrintLimit) {
2893       tty->print_cr("...<more frames>...");
2894       return;
2895     }
2896   }
2897 }
2898 
2899 
2900 void JavaThread::trace_stack() {


src/share/vm/runtime/thread.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File