RFR: 8306446: java/lang/management/ThreadMXBean/Locks.java transient failures [v3]
Serguei Spitsyn
sspitsyn at openjdk.org
Thu Jul 27 17:03:01 UTC 2023
On Wed, 26 Jul 2023 21:01:24 GMT, Kevin Walls <kevinw at 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
More information about the serviceability-dev
mailing list