< prev index next >

src/hotspot/share/runtime/thread.cpp

Print this page
rev 54213 : [mq]: 8220774-handshakealot-v3
rev 54214 : [mq]: 8220774-handshakealot-v4

*** 2946,2958 **** if (jvmti_thread_state() != NULL) { jvmti_thread_state()->oops_do(f); } } void JavaThread::nmethods_do(CodeBlobClosure* cf) { assert((!has_last_Java_frame() && java_call_counter() == 0) || ! (has_last_Java_frame() && java_call_counter() > 0), "wrong java_sp info!"); if (has_last_Java_frame()) { // Traverse the execution stack for (StackFrameStream fst(this); !fst.is_done(); fst.next()) { fst.current()->nmethods_do(cf); --- 2946,2970 ---- if (jvmti_thread_state() != NULL) { jvmti_thread_state()->oops_do(f); } } + #ifdef ASSERT + void JavaThread::verify_states_for_handshake() { + // This checks that the thread has a correct frame state during a handshake. + assert((!has_last_Java_frame() && java_call_counter() == 0) || + (has_last_Java_frame() && java_call_counter() > 0), + "unexpected frame info: has_last_frame=%d, java_call_counter=%d", + has_last_Java_frame(), java_call_counter()); + } + #endif + void JavaThread::nmethods_do(CodeBlobClosure* cf) { assert((!has_last_Java_frame() && java_call_counter() == 0) || ! (has_last_Java_frame() && java_call_counter() > 0), ! "unexpected frame info: has_last_frame=%d, java_call_counter=%d", ! has_last_Java_frame(), java_call_counter()); if (has_last_Java_frame()) { // Traverse the execution stack for (StackFrameStream fst(this); !fst.is_done(); fst.next()) { fst.current()->nmethods_do(cf);
< prev index next >