On Thu, 30 Mar 2023 22:21:06 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:
>> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: tweak in count_transitions_and_correct_jvmti_thread_states > > test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJvmtiTest/ToggleNotifyJvmtiTest.java > line 45: > >> 43: // to have sleep() calls to provide yielding as some frequency of virtual >> 44: // thread mount state transitions is needed for this test scenario. >> 45: class TestedThread extends Thread { > > Shouldn't this be a Runnable instead of a Thread? I would also suggest not > using the term "thread" here. Maybe "task"? Otherwise code like the > following is misleading: > > > TestedThread thread = threads[i]; > thread.letFinish(); > > There are no threads being referenced in this code, yet the term "thread" is > used 4 times. Thank you for the suggestion. I've renamed/rearranged it now. Let me know if it is not what you expected. > test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJvmtiTest/ToggleNotifyJvmtiTest.java > line 172: > >> 170: setVirtualThreadsNotifyJvmtiMode(iter, false); >> 171: >> 172: Thread tt = >> Thread.ofPlatform().name("StartThreadsTest").start(ToggleNotifyJvmtiTest::startThreads); > > Why does each test cycle need to be run in a separate platform thread? Can't > you just use the main test thread? You are right, hanks. I've made the suggested change. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13133#discussion_r1154022482 PR Review Comment: https://git.openjdk.org/jdk/pull/13133#discussion_r1154023063