On Thu, 1 Aug 2024 03:06:15 GMT, Jiawei Tang <jwt...@openjdk.org> wrote:
>> I add the testcase which can reproduce the crash. I hope that I could get >> some advise if the codes need changing. > > Jiawei Tang has updated the pull request incrementally with one additional > commit since the last revision: > > remove useless codes and refactor the testcase Thank you for the update! It looks good in general. I've requested a couple of nits to split long lines in the test though. test/hotspot/jtreg/serviceability/jvmti/vthread/TestPinCaseWithCFLH/TestPinCaseWithCFLH.java line 34: > 32: * @run driver jdk.test.lib.util.JavaAgentBuilder > 33: * TestPinCaseWithCFLH TestPinCaseWithCFLH.jar > 34: * @run main/othervm/timeout=100 > -Djdk.virtualThreadScheduler.maxPoolSize=1 -Djdk.tracePinnedThreads=full > --enable-native-access=ALL-UNNAMED -javaagent:TestPinCaseWithCFLH.jar > TestPinCaseWithCFLH Nit: Could you, please, rearrange to avoid long lines? test/hotspot/jtreg/serviceability/jvmti/vthread/TestPinCaseWithCFLH/TestPinCaseWithCFLH.java line 45: > 43: > 44: public static class TestClassFileTransformer implements > ClassFileTransformer { > 45: public byte[] transform(ClassLoader loader, String className, > Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] > classfileBuffer) throws IllegalClassFormatException { Nit: Could you, please, rearrange this to avoid long lines? test/hotspot/jtreg/serviceability/jvmti/vthread/TestPinCaseWithCFLH/TestPinCaseWithCFLH.java line 61: > 59: VThreadPinner.runPinned(() -> { > 60: try { > 61: Thread.sleep(500); // try yield, will pin, javaagent > + tracePinnedThreads should not lead to crash (because of the class > `PinnedThreadPrinter`) Nit: Could you, please, rearrange to avoid long lines? ------------- PR Review: https://git.openjdk.org/jdk/pull/20373#pullrequestreview-2212212420 PR Review Comment: https://git.openjdk.org/jdk/pull/20373#discussion_r1699830174 PR Review Comment: https://git.openjdk.org/jdk/pull/20373#discussion_r1699831041 PR Review Comment: https://git.openjdk.org/jdk/pull/20373#discussion_r1699831379