RFR: 8307153: JVMTI GetThreadState on carrier should return STATE_WAITING [v2]

Serguei Spitsyn sspitsyn at openjdk.org
Tue Jun 6 22:07:18 UTC 2023


On Tue, 6 Jun 2023 21:22:40 GMT, Alex Menkov <amenkov at 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 three additional commits since the last revision:
>> 
>>  - Merge
>>  - minor tweaks in libThreadStateTest.cpp
>>  - 8307153: JVMTI GetThreadState on carrier should return STATE_WAITING
>
> src/hotspot/share/prims/jvmtiEnvBase.cpp line 764:
> 
>> 762: 
>> 763:   if (is_passive_carrier_thread(jt, thread_oop)) {
>> 764:     state |= (JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY);
> 
> Not sure I understand this.
> I'd expect 
> `JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY` to be returned in the case.
> How can a thread be JVMTI_THREAD_STATE_RUNNABLE and JVMTI_THREAD_STATE_WAITING at the same time?

Good catch, thanks. Fixed now.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14298#discussion_r1220428448


More information about the serviceability-dev mailing list