src/hotspot/share/runtime/thread.cpp
changeset 48823 99c973b56994
parent 48490 4f647519c8be
child 48942 a6c4b85163c1
child 48961 120b61d50f85
equal deleted inserted replaced
48822:8a9808a9dd6b 48823:99c973b56994
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
  3198   HandleMark   hm;
  3198   HandleMark   hm;
  3199 
  3199 
  3200   RegisterMap reg_map(this);
  3200   RegisterMap reg_map(this);
  3201   vframe* start_vf = last_java_vframe(&reg_map);
  3201   vframe* start_vf = last_java_vframe(&reg_map);
  3202   int count = 0;
  3202   int count = 0;
  3203   for (vframe* f = start_vf; f; f = f->sender()) {
  3203   for (vframe* f = start_vf; f != NULL; f = f->sender()) {
  3204     if (f->is_java_frame()) {
  3204     if (f->is_java_frame()) {
  3205       javaVFrame* jvf = javaVFrame::cast(f);
  3205       javaVFrame* jvf = javaVFrame::cast(f);
  3206       java_lang_Throwable::print_stack_element(st, jvf->method(), jvf->bci());
  3206       java_lang_Throwable::print_stack_element(st, jvf->method(), jvf->bci());
  3207 
  3207 
  3208       // Print out lock information
  3208       // Print out lock information
  3211       }
  3211       }
  3212     } else {
  3212     } else {
  3213       // Ignore non-Java frames
  3213       // Ignore non-Java frames
  3214     }
  3214     }
  3215 
  3215 
  3216     // Bail-out case for too deep stacks
  3216     // Bail-out case for too deep stacks if MaxJavaStackTraceDepth > 0
  3217     count++;
  3217     count++;
  3218     if (MaxJavaStackTraceDepth == count) return;
  3218     if (MaxJavaStackTraceDepth > 0 && MaxJavaStackTraceDepth == count) return;
  3219   }
  3219   }
  3220 }
  3220 }
  3221 
  3221 
  3222 
  3222 
  3223 // JVMTI PopFrame support
  3223 // JVMTI PopFrame support