8220774: Add HandshakeALot diag option

Reviewed-by: dcubed, dholmes
This commit is contained in:
Robbin Ehn 2019-03-26 12:08:51 +01:00
parent afa3178149
commit ed3542d53b
10 changed files with 171 additions and 125 deletions

View file

@ -2928,9 +2928,21 @@ void JavaThread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
}
}
#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), "wrong java_sp info!");
(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