On Fri, 28 May 2021 07:06:50 GMT, Yasumasa Suenaga <[email protected]> wrote:
> I thought we took snapshots when threads were known to be safe and stable. When we ask for snapshots with stack traces, we use a safepoint to get all of target thread's stack traces at the same time. Obviously that code path is safe. The "other" code path is when we don't ask for stack traces and that path has always been carefully coded to return non stack trace information in a safe manner, but it does not use a safepoint or a handshake. This duality in code paths is why the new test I wrote: serviceability/monitoring/ThreadInfo/GetLockOwnerName/GetLockOwnerName.java makes alternating calls of asking for the stack trace and then not. ------------- PR: https://git.openjdk.java.net/jdk/pull/4224
