With the virtual thread factory main runs on a virtual thread and AsyncGetCallTrace keeps walking into the carrier, GetStackTrace stops at the continuation entry. So the two never had the same number of frames there. AsyncGetCallTrace itself is left alone, profilers build on what it returns today and the replacement API is its own effort.
The test now runs the check on a platform thread and on a virtual thread it starts itself, whatever main runs on. Platform stays the exact comparison. On the virtual thread the GetStackTrace frames have to be a prefix of the AsyncGetCallTrace frames and the next frame has to be Continuation.enterSpecial. With -XX:-VMContinuations both lists are the same and that passes too. The virtual ProblemList entry is gone. --- Testing: - [x] The test five times on linux-x64 and linux-aarch64 debug with the platform factory, the virtual factory and -XX:-VMContinuations, plus tier1-3 on both --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8308026: AsyncGetCallTraceTest fails with virtual threads Changes: https://git.openjdk.org/jdk/pull/33617/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33617&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8308026 Stats: 50 lines in 3 files changed: 40 ins; 1 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/33617.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/33617/head:pull/33617 PR: https://git.openjdk.org/jdk/pull/33617
