8268368: Adopt cast notation for JavaThread conversions

Reviewed-by: dholmes, stefank
This commit is contained in:
Guoxiong Li 2021-06-23 02:21:24 +00:00 committed by David Holmes
parent b6cfca8a89
commit cd678a383f
64 changed files with 139 additions and 145 deletions

View file

@ -427,7 +427,7 @@ DeadlockCycle* ThreadService::find_deadlocks_at_safepoint(ThreadsList * t_list,
Thread* owner = waitingToLockRawMonitor->owner();
if (owner != NULL && // the raw monitor could be released at any time
owner->is_Java_thread()) {
currentThread = owner->as_Java_thread();
currentThread = JavaThread::cast(owner);
}
} else if (waitingToLockMonitor != NULL) {
address currentOwner = (address)waitingToLockMonitor->owner();
@ -986,7 +986,7 @@ void DeadlockCycle::print_on_with(ThreadsList * t_list, outputStream* st) const
// Could be NULL as the raw monitor could be released at any time if held by non-JavaThread
if (owner != NULL) {
if (owner->is_Java_thread()) {
currentThread = owner->as_Java_thread();
currentThread = JavaThread::cast(owner);
st->print_cr("%s \"%s\"", owner_desc, currentThread->get_thread_name());
} else {
st->print_cr(",\n which has now been released");