On Wed, 26 Jul 2023 21:01:24 GMT, Kevin Walls <kev...@openjdk.org> wrote:
>> test/jdk/java/lang/management/ThreadMXBean/Locks.java line 474: >> >>> 472: lock = ownerInfo.getLockName(); >>> 473: continue; >>> 474: } >> >> What happens if you don't exclude these ForkJoinPool threads? What about the >> myriad of other threads that the JVM always starts up. Should they not also >> be skipped if you are going to skip ForkJoinPool threads? > > Thanks for the feedback, updated. > On this point, the method is only invoked on a very limited set of locks and > threads. It is called to examine LockAThread and LockBThread, and the test > main thread (if not virtual). So it will not (should not!) see a lock owner > which is some other thread, it's not a useful generic utility method. This is not that easy to make this conclusion. I'm thinking if placing a comment would help. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14501#discussion_r1276574372