SleepingThread in ThreadController had a hardcoded list of JDK method names for 
stack trace checking every Thread.sleep change (JFR events, virtual threads, 
etc) required updating this list. Replaced with a generic JDK frame filter 
(java.*/jdk.*/sun.*) that works at any stack position, matching the approach 
already used in strace001.java and SleepingThread.java. Also added overridable 
checkElement/stackTraceLength methods to BaseThread so only SleepingThread 
behavior changes.




---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

-------------

Commit messages:
 - 8340088: Stack tracing tests of sleeping thread should be more resilient to 
code changes

Changes: https://git.openjdk.org/jdk/pull/31357/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=31357&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8340088
  Stats: 51 lines in 1 file changed: 31 ins; 15 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/31357.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/31357/head:pull/31357

PR: https://git.openjdk.org/jdk/pull/31357

Reply via email to