On Mon, 4 Mar 2024 07:06:31 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> Serguei Spitsyn has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains four additional 
>> commits since the last revision:
>> 
>>  - Merge
>>  - Merge
>>  - fix specs: JDWP ThreadReference.CurrentContendedMonitor command, JDI 
>> ThreadReference.currentContendedMonitor method
>>  - 8256314: JVM TI GetCurrentContendedMonitor is implemented incorrectly
>
> src/hotspot/share/prims/jvmtiEnvBase.cpp line 941:
> 
>> 939:     bool is_virtual = java_lang_VirtualThread::is_instance(thread_oop);
>> 940:     jint state = is_virtual ? 
>> JvmtiEnvBase::get_vthread_state(thread_oop, java_thread)
>> 941:                             : 
>> JvmtiEnvBase::get_thread_state(thread_oop, java_thread);
> 
> I've seen this in a couple of your PRs now. It would be nice to have a 
> utility function to get the JVMTI thread state of any java.lang.Thread 
> instance.

Good suggestion, thanks. Will add.

> src/java.se/share/data/jdwp/jdwp.spec line 1985:
> 
>> 1983:         "thread may be waiting to enter the object's monitor, or in "
>> 1984:         "java.lang.Object.wait waiting to re-enter the monitor after 
>> being "
>> 1985:         "notified, interrupted, or timeout."
> 
> `timed-out` would be the correct sense here.

Thank you, David. I was thinking about it but was not sure. Will update it.

> src/jdk.jdi/share/classes/com/sun/jdi/ThreadReference.java line 314:
> 
>> 312:      * synchronized method, the synchronized statement, or
>> 313:      * {@link Object#wait} waiting to re-enter the monitor
>> 314:      * after being notified, interrupted, or timeout.
> 
> Again `timed-out`.

Will fix, thanks.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17944#discussion_r1510890499
PR Review Comment: https://git.openjdk.org/jdk/pull/17944#discussion_r1510887118
PR Review Comment: https://git.openjdk.org/jdk/pull/17944#discussion_r1510887956

Reply via email to