提交 a225727a 编写于 作者: I iveresov

6986270: guarantee(*bcp != Bytecodes::_monitorenter || exec_mode !=...

6986270: guarantee(*bcp != Bytecodes::_monitorenter || exec_mode != Deoptimization::Unpack_exception) fails
Summary: Propagate the compiler type of the deopting method to vframeArrayElement::unpack_on_stack()
Reviewed-by: jrose, never
上级 419b7a80
......@@ -124,6 +124,9 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread
RegisterMap dummy_map(thread, false);
// Now get the deoptee with a valid map
frame deoptee = stub_frame.sender(&map);
// Set the deoptee nmethod
assert(thread->deopt_nmethod() == NULL, "Pending deopt!");
thread->set_deopt_nmethod(deoptee.cb()->as_nmethod_or_null());
// Create a growable array of VFrames where each VFrame represents an inlined
// Java frame. This storage is allocated with the usual system arena.
......@@ -445,6 +448,7 @@ void Deoptimization::cleanup_deopt_info(JavaThread *thread,
delete thread->deopt_mark();
thread->set_deopt_mark(NULL);
thread->set_deopt_nmethod(NULL);
if (JvmtiExport::can_pop_frame()) {
......
......@@ -1183,6 +1183,7 @@ void JavaThread::initialize() {
set_vframe_array_last(NULL);
set_deferred_locals(NULL);
set_deopt_mark(NULL);
set_deopt_nmethod(NULL);
clear_must_deopt_id();
set_monitor_chunks(NULL);
set_next(NULL);
......
......@@ -680,7 +680,7 @@ class JavaThread: public Thread {
intptr_t* _must_deopt_id; // id of frame that needs to be deopted once we
// transition out of native
nmethod* _deopt_nmethod; // nmethod that is currently being deoptimized
vframeArray* _vframe_array_head; // Holds the heap of the active vframeArrays
vframeArray* _vframe_array_last; // Holds last vFrameArray we popped
// Because deoptimization is lazy we must save jvmti requests to set locals
......@@ -1098,6 +1098,9 @@ class JavaThread: public Thread {
void set_must_deopt_id(intptr_t* id) { _must_deopt_id = id; }
void clear_must_deopt_id() { _must_deopt_id = NULL; }
void set_deopt_nmethod(nmethod* nm) { _deopt_nmethod = nm; }
nmethod* deopt_nmethod() { return _deopt_nmethod; }
methodOop callee_target() const { return _callee_target; }
void set_callee_target (methodOop x) { _callee_target = x; }
......
......@@ -179,9 +179,11 @@ void vframeArrayElement::unpack_on_stack(int callee_parameters,
// in which case bcp should point to the monitorenter since it is within the exception's range.
assert(*bcp != Bytecodes::_monitorenter || is_top_frame, "a _monitorenter must be a top frame");
// TIERED Must know the compiler of the deoptee QQQ
COMPILER2_PRESENT(guarantee(*bcp != Bytecodes::_monitorenter || exec_mode != Deoptimization::Unpack_exception,
"shouldn't get exception during monitorenter");)
assert(thread->deopt_nmethod() != NULL, "nmethod should be known");
guarantee(!(thread->deopt_nmethod()->is_compiled_by_c2() &&
*bcp == Bytecodes::_monitorenter &&
exec_mode == Deoptimization::Unpack_exception),
"shouldn't get exception during monitorenter");
int popframe_preserved_args_size_in_bytes = 0;
int popframe_preserved_args_size_in_words = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册