RFR: 8306034: add support of virtual threads to JVMTI StopThread [v3]
Chris Plummer
cjplummer at openjdk.org
Fri Apr 21 19:00:48 UTC 2023
On Fri, 21 Apr 2023 18:41:41 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
>> test/hotspot/jtreg/serviceability/jvmti/vthread/StopThreadTest/StopThreadTest.java line 89:
>>
>>> 87: log("\nMain #A: method A() must be blocked on entering a synchronized statement");
>>> 88: synchronized (TestTask.lock) {
>>> 89: testTaskThread = Thread.ofVirtual().name("TestTaskThread").start(testTask);
>>
>> Do we have other tests that are doing the equivalent testing on platform threads?
>
> Do you ask this question to check if we want to extend this test to provide coverage for platform threads as well?
>
> The support of platform threads is much simpler. The JVMTI `StopThread` never returns the `THREAD_NOT_SUSPENDED` and `OPAQUE_FRAME` error codes for platform threads. So that this kind of testing is not needed for platform threads.
For the JDI tests I added, I execute them in both modes, with the appropriate adjustments to account for the errors we except for virtual threads. We should be testing to make sure that StopThread works with platform threads under a variety of situations.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13546#discussion_r1174080418
More information about the serviceability-dev
mailing list