hotspot/src/share/vm/runtime/deoptimization.cpp
Print this page
*** 252,261 ****
--- 252,262 ----
delete list;
}
}
+ #ifndef SHARK
// Compute the caller frame based on the sender sp of stub_frame and stored frame sizes info.
CodeBlob* cb = stub_frame.cb();
// Verify we have the right vframeArray
assert(cb->frame_size() >= 0, "Unexpected frame size");
intptr_t* unpack_sp = stub_frame.sp() + cb->frame_size();
*** 268,277 ****
--- 269,282 ----
#ifdef ASSERT
assert(cb->is_deoptimization_stub() || cb->is_uncommon_trap_stub(), "just checking");
Events::log("fetch unroll sp " INTPTR_FORMAT, unpack_sp);
#endif
+ #else
+ intptr_t* unpack_sp = stub_frame.sender(&dummy_map).unextended_sp();
+ #endif // !SHARK
+
// This is a guarantee instead of an assert because if vframe doesn't match
// we will unpack the wrong deoptimized frame and wind up in strange places
// where it will be very difficult to figure out what went wrong. Better
// to die an early death here than some very obscure death later when the
// trail is cold.
*** 378,388 ****
--- 383,395 ----
// since the frame will "magically" show the original pc before the deopt
// and we'd undo the deopt.
frame_pcs[0] = deopt_sender.raw_pc();
+ #ifndef SHARK
assert(CodeCache::find_blob_unsafe(frame_pcs[0]) != NULL, "bad pc");
+ #endif // SHARK
UnrollBlock* info = new UnrollBlock(array->frame_size() * BytesPerWord,
caller_adjustment * BytesPerWord,
number_of_frames,
frame_sizes,
*** 1071,1081 ****
thread->popframe_preserve_args(in_ByteSize(bytes_to_save), start_address);
}
JRT_END
! #ifdef COMPILER2
void Deoptimization::load_class_by_index(constantPoolHandle constant_pool, int index, TRAPS) {
// in case of an unresolved klass entry, load the class.
if (constant_pool->tag_at(index).is_unresolved_klass()) {
klassOop tk = constant_pool->klass_at(index, CHECK);
return;
--- 1078,1088 ----
thread->popframe_preserve_args(in_ByteSize(bytes_to_save), start_address);
}
JRT_END
! #if defined(COMPILER2) || defined(SHARK)
void Deoptimization::load_class_by_index(constantPoolHandle constant_pool, int index, TRAPS) {
// in case of an unresolved klass entry, load the class.
if (constant_pool->tag_at(index).is_unresolved_klass()) {
klassOop tk = constant_pool->klass_at(index, CHECK);
return;
*** 1833,1843 ****
}
#undef PRINT_STAT_LINE
if (xtty != NULL) xtty->tail("statistics");
}
}
! #else // COMPILER2
// Stubs for C1 only system.
bool Deoptimization::trap_state_is_recompiled(int trap_state) {
return false;
--- 1840,1850 ----
}
#undef PRINT_STAT_LINE
if (xtty != NULL) xtty->tail("statistics");
}
}
! #else // COMPILER2 || SHARK
// Stubs for C1 only system.
bool Deoptimization::trap_state_is_recompiled(int trap_state) {
return false;
*** 1869,1874 ****
int trap_state) {
jio_snprintf(buf, buflen, "#%d", trap_state);
return buf;
}
! #endif // COMPILER2
--- 1876,1881 ----
int trap_state) {
jio_snprintf(buf, buflen, "#%d", trap_state);
return buf;
}
! #endif // COMPILER2 || SHARK