RFR: 8307153: JVMTI GetThreadState on carrier should return STATE_WAITING
Serguei Spitsyn
sspitsyn at openjdk.org
Sat Jun 3 11:25:23 UTC 2023
When a virtual thread is mounted, the carrier thread should be reported as "waiting" until the virtual thread unmounts. Right now, GetThreadState reports a state based the JavaThread status when it should return JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY.
The fix adds:
- a special case for passive carrier threads
- necessary test coverage to the existing JVMTI test: `serviceability/jvmti/vthread/ThreadStateTest`.
Testing:
- tested with the updated test: `serviceability/jvmti/vthread/ThreadStateTest`
- submitted mach5 tiers 1-5
- TBD: to submit mach5 tier 6
-------------
Commit messages:
- minor tweaks in libThreadStateTest.cpp
- 8307153: JVMTI GetThreadState on carrier should return STATE_WAITING
Changes: https://git.openjdk.org/jdk/pull/14298/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14298&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8307153
Stats: 71 lines in 4 files changed: 61 ins; 0 del; 10 mod
Patch: https://git.openjdk.org/jdk/pull/14298.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14298/head:pull/14298
PR: https://git.openjdk.org/jdk/pull/14298
More information about the serviceability-dev
mailing list