< prev index next >

src/hotspot/share/services/threadService.cpp

Print this page

        

*** 21,30 **** --- 21,31 ---- * questions. * */ #include "precompiled.hpp" + #include "classfile/javaClasses.inline.hpp" #include "classfile/systemDictionary.hpp" #include "memory/allocation.hpp" #include "memory/heapInspection.hpp" #include "memory/oopFactory.hpp" #include "memory/resourceArea.hpp"
*** 553,562 **** --- 554,564 ---- StackFrameInfo::StackFrameInfo(javaVFrame* jvf, bool with_lock_info) { _method = jvf->method(); _bci = jvf->bci(); _class_holder = _method->method_holder()->klass_holder(); _locked_monitors = NULL; + _cont_scope_name = (jvf->continuation() != NULL) ? java_lang_ContinuationScope::name(java_lang_Continuation::scope(jvf->continuation())) : (oop)NULL; if (with_lock_info) { ResourceMark rm; GrowableArray<MonitorInfo*>* list = jvf->locked_monitors(); int length = list->length(); if (length > 0) {
*** 576,585 **** --- 578,588 ---- for (int i = 0; i < length; i++) { f->do_oop((oop*) _locked_monitors->adr_at(i)); } } f->do_oop(&_class_holder); + f->do_oop(&_cont_scope_name); } void StackFrameInfo::metadata_do(void f(Metadata*)) { f(_method); }
*** 639,649 **** void ThreadStackTrace::dump_stack_at_safepoint(int maxDepth) { assert(SafepointSynchronize::is_at_safepoint(), "all threads are stopped"); if (_thread->has_last_Java_frame()) { ! RegisterMap reg_map(_thread); vframe* start_vf = _thread->last_java_vframe(&reg_map); int count = 0; for (vframe* f = start_vf; f; f = f->sender() ) { if (maxDepth >= 0 && count == maxDepth) { // Skip frames if more than maxDepth --- 642,652 ---- void ThreadStackTrace::dump_stack_at_safepoint(int maxDepth) { assert(SafepointSynchronize::is_at_safepoint(), "all threads are stopped"); if (_thread->has_last_Java_frame()) { ! RegisterMap reg_map(_thread, true, false); vframe* start_vf = _thread->last_java_vframe(&reg_map); int count = 0; for (vframe* f = start_vf; f; f = f->sender() ) { if (maxDepth >= 0 && count == maxDepth) { // Skip frames if more than maxDepth
*** 697,707 **** objArrayOop ste = oopFactory::new_objArray(ik, _depth, CHECK_NH); objArrayHandle backtrace(THREAD, ste); for (int j = 0; j < _depth; j++) { StackFrameInfo* frame = _frames->at(j); methodHandle mh(THREAD, frame->method()); ! oop element = java_lang_StackTraceElement::create(mh, frame->bci(), CHECK_NH); backtrace->obj_at_put(j, element); } return backtrace; } --- 700,711 ---- objArrayOop ste = oopFactory::new_objArray(ik, _depth, CHECK_NH); objArrayHandle backtrace(THREAD, ste); for (int j = 0; j < _depth; j++) { StackFrameInfo* frame = _frames->at(j); methodHandle mh(THREAD, frame->method()); ! Handle contScopeNameH(THREAD, frame->cont_scope_name()); ! oop element = java_lang_StackTraceElement::create(mh, frame->bci(), contScopeNameH, CHECK_NH); backtrace->obj_at_put(j, element); } return backtrace; }
< prev index next >