mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +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
|
@ -522,7 +522,7 @@ void Method::build_interpreter_method_data(const methodHandle& method, TRAPS) {
|
|||
|
||||
// Grab a lock here to prevent multiple
|
||||
// MethodData*s from being created.
|
||||
MutexLocker ml(MethodData_lock, THREAD);
|
||||
MutexLocker ml(THREAD, MethodData_lock);
|
||||
if (method->method_data() == NULL) {
|
||||
ClassLoaderData* loader_data = method->method_holder()->class_loader_data();
|
||||
MethodData* method_data = MethodData::allocate(loader_data, method, THREAD);
|
||||
|
@ -2455,7 +2455,7 @@ void Method::log_touched(TRAPS) {
|
|||
my_sig->identity_hash();
|
||||
juint index = juint(hash) % table_size;
|
||||
|
||||
MutexLocker ml(TouchedMethodLog_lock, THREAD);
|
||||
MutexLocker ml(THREAD, TouchedMethodLog_lock);
|
||||
if (_touched_method_table == NULL) {
|
||||
_touched_method_table = NEW_C_HEAP_ARRAY2(TouchedMethodRecord*, table_size,
|
||||
mtTracing, CURRENT_PC);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue