RFR: 8343957: Rename ObjectMonitor::owner_from() and JavaThread::_lock_id [v2]
Patricio Chilano Mateo
pchilanomate at openjdk.org
Wed Dec 4 15:47:26 UTC 2024
On Wed, 4 Dec 2024 01:36:42 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Patricio Chilano Mateo has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix parameter name
>
> src/hotspot/share/runtime/javaThread.hpp line 174:
>
>> 172: void set_monitor_owner_id(int64_t val) {
>> 173: assert(val >= ThreadIdentifier::initial() && val < ThreadIdentifier::current(), "");
>> 174: _monitor_owner_id = val;
>
> Nit: Using `id` rather than `val` would be more consistent with other changes (`ObjectMonitor::owner_id_from`)
Fixed.
> src/hotspot/share/runtime/threads.cpp line 1363:
>
>> 1361: p->print_stack_on(st);
>> 1362: if (p->is_vthread_mounted()) {
>> 1363: st->print_cr(" Mounted virtual thread #" INT64_FORMAT, java_lang_Thread::thread_id(p->vthread()));
>
> Was initially unsure why `p->lock_id()` didn't change to `p->monitor_owner_id()`, but here you want the thread-id not something that happens to match the thread-id.
Exactly.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22524#discussion_r1869818716
PR Review Comment: https://git.openjdk.org/jdk/pull/22524#discussion_r1869819018
More information about the graal-dev
mailing list