@@ -236,8 +236,8 @@ void JavaThread::allocate_threadObj(Handle thread_group, const char* thread_name
236236 // constructor calls Thread.current(), which must be set here.
237237 java_lang_Thread::set_thread (thread_oop (), this );
238238 set_threadOopHandles (thread_oop ());
239- // Set the lock_id to the next thread_id temporarily while initialization runs.
240- set_lock_id (ThreadIdentifier::next ());
239+ // Set the _monitor_owner_id to the next thread_id temporarily while initialization runs.
240+ set_monitor_owner_id (ThreadIdentifier::next ());
241241
242242 JavaValue result (T_VOID);
243243 if (thread_name != nullptr ) {
@@ -263,8 +263,8 @@ void JavaThread::allocate_threadObj(Handle thread_group, const char* thread_name
263263 Handle (),
264264 CHECK);
265265 }
266- // Update the lock_id with the tid value.
267- set_lock_id (java_lang_Thread::thread_id (thread_oop ()));
266+ // Update the _monitor_owner_id with the tid value.
267+ set_monitor_owner_id (java_lang_Thread::thread_id (thread_oop ()));
268268
269269 os::set_priority (this , NormPriority);
270270
@@ -435,7 +435,7 @@ JavaThread::JavaThread(MemTag mem_tag) :
435435 _current_waiting_monitor(nullptr ),
436436 _active_handles(nullptr ),
437437 _free_handle_block(nullptr ),
438- _lock_id (0 ),
438+ _monitor_owner_id (0 ),
439439
440440 _suspend_flags(0 ),
441441
@@ -1544,8 +1544,7 @@ void JavaThread::print_on(outputStream *st, bool print_extended_info) const {
15441544 st->print_cr (" [" INTPTR_FORMAT " ]" , (intptr_t )last_Java_sp () & ~right_n_bits (12 ));
15451545 if (thread_oop != nullptr ) {
15461546 if (is_vthread_mounted ()) {
1547- // _lock_id is the thread ID of the mounted virtual thread
1548- st->print_cr (" Carrying virtual thread #" INT64_FORMAT, lock_id ());
1547+ st->print_cr (" Carrying virtual thread #" INT64_FORMAT, java_lang_Thread::thread_id (vthread ()));
15491548 } else {
15501549 st->print_cr (" java.lang.Thread.State: %s" , java_lang_Thread::thread_status_name (thread_oop));
15511550 }
@@ -1729,7 +1728,7 @@ void JavaThread::prepare(jobject jni_thread, ThreadPriority prio) {
17291728 assert (InstanceKlass::cast (thread_oop->klass ())->is_linked (),
17301729 " must be initialized" );
17311730 set_threadOopHandles (thread_oop ());
1732- set_lock_id (java_lang_Thread::thread_id (thread_oop ()));
1731+ set_monitor_owner_id (java_lang_Thread::thread_id (thread_oop ()));
17331732
17341733 if (prio == NoPriority) {
17351734 prio = java_lang_Thread::priority (thread_oop ());
@@ -2234,7 +2233,7 @@ void JavaThread::start_internal_daemon(JavaThread* current, JavaThread* target,
22342233
22352234 // Now bind the thread_oop to the target JavaThread.
22362235 target->set_threadOopHandles (thread_oop ());
2237- target->set_lock_id (java_lang_Thread::thread_id (thread_oop ()));
2236+ target->set_monitor_owner_id (java_lang_Thread::thread_id (thread_oop ()));
22382237
22392238 Threads::add (target); // target is now visible for safepoint/handshake
22402239 // Publish the JavaThread* in java.lang.Thread after the JavaThread* is
0 commit comments