< prev index next >

src/hotspot/share/runtime/vframe.cpp

Print this page
rev 59866 : 8249192: MonitorInfo stores raw oops across safepoints
Summary: Change raw oops in MonitorInfo to Handles and update Resource/HandleMarks.
Reviewed-by: sspitsyn, dholmes, coleenp, dcubed

*** 163,172 **** --- 163,173 ---- } void javaVFrame::print_lock_info_on(outputStream* st, int frame_count) { Thread* THREAD = Thread::current(); ResourceMark rm(THREAD); + HandleMark hm(THREAD); // If this is the first frame and it is java.lang.Object.wait(...) // then print out the receiver. Locals are not always available, // e.g., compiled native frames have no scope so there are no locals. if (frame_count == 0) {
*** 445,454 **** --- 446,470 ---- // ------------- cChunk -------------- entryVFrame::entryVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread) : externalVFrame(fr, reg_map, thread) {} + MonitorInfo::MonitorInfo(oop owner, BasicLock* lock, bool eliminated, bool owner_is_scalar_replaced) { + Thread* thread = Thread::current(); + if (!owner_is_scalar_replaced) { + _owner = Handle(thread, owner); + _owner_klass = Handle(); + } else { + assert(eliminated, "monitor should be eliminated for scalar replaced object"); + _owner = Handle(); + _owner_klass = Handle(thread, owner); + } + _lock = lock; + _eliminated = eliminated; + _owner_is_scalar_replaced = owner_is_scalar_replaced; + } + #ifdef ASSERT void vframeStreamCommon::found_bad_method_frame() const { // 6379830 Cut point for an assertion that occasionally fires when // we are using the performance analyzer. // Disable this assert when testing the analyzer with fastdebug.
*** 610,619 **** --- 626,637 ---- } void javaVFrame::print() { ResourceMark rm; + HandleMark hm; + vframe::print(); tty->print("\t"); method()->print_value(); tty->cr(); tty->print_cr("\tbci: %d", bci());
< prev index next >