RFR: 8346792: serviceability/jvmti/vthread/GetThreadState/GetThreadState.java testObjectWaitMillis failed [v2]
Serguei Spitsyn
sspitsyn at openjdk.org
Thu Jan 16 03:54:27 UTC 2025
On Wed, 15 Jan 2025 22:41:32 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
>> src/hotspot/share/runtime/objectMonitor.cpp line 1699:
>>
>>> 1697: : JavaThreadStatus::IN_OBJECT_WAIT;
>>> 1698: java_lang_Thread::set_thread_status(current->threadObj(), state);
>>> 1699: }
>>
>> It does look a bit hacky. How about moving JavaThreadInObjectWaitState here and change the constructor instead to receive interruptible as argument. Something like:
>>
>>
>> JavaThreadInObjectWaitState(JavaThread *java_thread, bool interruptible, bool timed) :
>> JavaThreadStatusChanger(java_thread, !interruptible ? java_lang_Thread::get_thread_status(java_thread->threadObj()) : timed ? JavaThreadStatus::IN_OBJECT_WAIT_TIMED : JavaThreadStatus::IN_OBJECT_WAIT) {
>
> Good suggestion, thanks. I was also thinking about this. So, will give it a try now.
Re-fixed with the suggestion above. The mach5 tiers 1-6 are all passed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23126#discussion_r1917624580
More information about the hotspot-runtime-dev
mailing list