8252406: Introduce Thread::as_Java_thread() convenience function

Reviewed-by: shade, coleenp, kbarrett, dcubed
This commit is contained in:
David Holmes 2020-09-11 01:31:32 +00:00
parent 488022689f
commit 976acddeb5
110 changed files with 360 additions and 456 deletions

View file

@ -536,7 +536,7 @@ void vm_exit(int code) {
// Historically there must have been some exit path for which
// that was not the case and so we set it explicitly - even
// though we no longer know what that path may be.
((JavaThread*)thread)->set_thread_state(_thread_in_vm);
thread->as_Java_thread()->set_thread_state(_thread_in_vm);
}
// Fire off a VM_Exit operation to bring VM to a safepoint and exit
@ -577,7 +577,7 @@ void vm_perform_shutdown_actions() {
if (thread != NULL && thread->is_Java_thread()) {
// We are leaving the VM, set state to native (in case any OS exit
// handlers call back to the VM)
JavaThread* jt = (JavaThread*)thread;
JavaThread* jt = thread->as_Java_thread();
// Must always be walkable or have no last_Java_frame when in
// thread_in_native
jt->frame_anchor()->make_walkable(jt);