< prev index next >
src/hotspot/share/classfile/javaClasses.cpp
Print this page
*** 40,50 ****
#include "memory/heapShared.inline.hpp"
#include "memory/metaspaceShared.hpp"
#include "memory/oopFactory.hpp"
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
! #include "oops/fieldStreams.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/instanceMirrorKlass.hpp"
#include "oops/klass.hpp"
#include "oops/method.inline.hpp"
#include "oops/objArrayOop.inline.hpp"
--- 40,50 ----
#include "memory/heapShared.inline.hpp"
#include "memory/metaspaceShared.hpp"
#include "memory/oopFactory.hpp"
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
! #include "oops/fieldStreams.inline.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/instanceMirrorKlass.hpp"
#include "oops/klass.hpp"
#include "oops/method.inline.hpp"
#include "oops/objArrayOop.inline.hpp"
*** 2268,2278 ****
}
st->print_cr("%s", buf);
}
! void java_lang_Throwable::print_stack_element(outputStream *st, const methodHandle& method, int bci) {
Handle mirror (Thread::current(), method->method_holder()->java_mirror());
int method_id = method->orig_method_idnum();
int version = method->constants()->version();
print_stack_element_to_stream(st, mirror, method_id, version, bci, method->name());
}
--- 2268,2278 ----
}
st->print_cr("%s", buf);
}
! void java_lang_Throwable::print_stack_element(outputStream *st, Method* method, int bci) {
Handle mirror (Thread::current(), method->method_holder()->java_mirror());
int method_id = method->orig_method_idnum();
int version = method->constants()->version();
print_stack_element_to_stream(st, mirror, method_id, version, bci, method->name());
}
*** 2374,2384 ****
// See bug 6333838 for more details.
// The "ASSERT" here is to verify this method generates the exactly same stack
// trace as utilizing vframe.
#ifdef ASSERT
vframeStream st(thread);
- methodHandle st_method(THREAD, st.method());
#endif
int total_count = 0;
RegisterMap map(thread, false);
int decode_offset = 0;
CompiledMethod* nm = NULL;
--- 2374,2383 ----
*** 2424,2441 ****
continue;
}
}
}
#ifdef ASSERT
! assert(st_method() == method && st.bci() == bci,
"Wrong stack trace");
st.next();
- // vframeStream::method isn't GC-safe so store off a copy
- // of the Method* in case we GC.
- if (!st.at_end()) {
- st_method = st.method();
- }
#endif
// the format of the stacktrace will be:
// - 1 or more fillInStackTrace frames for the exception class (skipped)
// - 0 or more <init> methods for the exception class (skipped)
--- 2423,2435 ----
continue;
}
}
}
#ifdef ASSERT
! assert(st.method() == method && st.bci() == bci,
"Wrong stack trace");
st.next();
#endif
// the format of the stacktrace will be:
// - 1 or more fillInStackTrace frames for the exception class (skipped)
// - 0 or more <init> methods for the exception class (skipped)
*** 2694,2704 ****
java_lang_Class::set_source_file(java_class(), source_file);
}
}
java_lang_StackTraceElement::set_fileName(element(), source_file);
! int line_number = Backtrace::get_line_number(method, bci);
java_lang_StackTraceElement::set_lineNumber(element(), line_number);
}
}
#if INCLUDE_JVMCI
--- 2688,2698 ----
java_lang_Class::set_source_file(java_class(), source_file);
}
}
java_lang_StackTraceElement::set_fileName(element(), source_file);
! int line_number = Backtrace::get_line_number(method(), bci);
java_lang_StackTraceElement::set_lineNumber(element(), line_number);
}
}
#if INCLUDE_JVMCI
*** 2769,2779 ****
Method* method = java_lang_StackFrameInfo::get_method(stackFrame, holder, CHECK);
short version = stackFrame->short_field(_version_offset);
int bci = stackFrame->int_field(_bci_offset);
Symbol* name = method->name();
! java_lang_StackTraceElement::fill_in(stack_trace_element, holder, method, version, bci, name, CHECK);
}
#define STACKFRAMEINFO_FIELDS_DO(macro) \
macro(_memberName_offset, k, "memberName", object_signature, false); \
macro(_bci_offset, k, "bci", int_signature, false)
--- 2763,2774 ----
Method* method = java_lang_StackFrameInfo::get_method(stackFrame, holder, CHECK);
short version = stackFrame->short_field(_version_offset);
int bci = stackFrame->int_field(_bci_offset);
Symbol* name = method->name();
! java_lang_StackTraceElement::fill_in(stack_trace_element, holder, methodHandle(THREAD, method),
! version, bci, name, CHECK);
}
#define STACKFRAMEINFO_FIELDS_DO(macro) \
macro(_memberName_offset, k, "memberName", object_signature, false); \
macro(_bci_offset, k, "bci", int_signature, false)
< prev index next >