> To test ForceEarlyReturn command for NO_MORE_FRAMES case the test creates > ThreadStartEventRequest with SUSPEND_ALL policy and requests debuggee to > start new thread. > If debuggee JVM starts some internal threads before the request is cleared > (i.e. we have several ThreadStart events), 2nd event suspends debuggee again > and the test fails with timeout. > The change adds THREAD_ONLY modifier to the ThreadStartEventRequest to > generate event only for desired thread. > It requires thread ID, so debuggee was updated to create Thread object in > advance, debugger reads the thread ID from static field (it does not need to > be static, but Debugee class has convenient methods to retrieve class ID and > static field value). > > Testing: 100 runs of the test on > windows-x64-debug,linux-x64-debug,macosx-x64-debug with > JTREG_TEST_THREAD_FACTORY=Virtual, with and without "-XX:+UseZGC > -XX:+ZGenerational"
Alex Menkov has updated the pull request incrementally with one additional commit since the last revision: Chris feedback - enhanced comment ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15601/files - new: https://git.openjdk.org/jdk/pull/15601/files/310115de..5736e1c6 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15601&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15601&range=00-01 Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15601.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15601/head:pull/15601 PR: https://git.openjdk.org/jdk/pull/15601