mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8235678: Remove unnecessary calls to Thread::current() in MutexLocker calls
Add THREAD argument when available and make Thread* the first argument to relevant MutexLocker and MonitorLocker constructors Reviewed-by: lfoltan, coleenp, dholmes
This commit is contained in:
parent
e2240b714e
commit
7fc58a1020
36 changed files with 122 additions and 121 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -2580,7 +2580,7 @@ void JvmtiExport::post_sampled_object_alloc(JavaThread *thread, oop object) {
|
|||
|
||||
void JvmtiExport::cleanup_thread(JavaThread* thread) {
|
||||
assert(JavaThread::current() == thread, "thread is not current");
|
||||
MutexLocker mu(JvmtiThreadState_lock);
|
||||
MutexLocker mu(thread, JvmtiThreadState_lock);
|
||||
|
||||
if (thread->jvmti_thread_state() != NULL) {
|
||||
// This has to happen after the thread state is removed, which is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue