RFR: 8257831: Suspend with handshakes [v2]

Daniel D.Daugherty dcubed at openjdk.java.net
Tue Apr 6 18:51:42 UTC 2021


On Tue, 6 Apr 2021 12:22:42 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> Sure. I agree with your comment.
>
> I think we should add JVMTI_ERROR_THREAD_SUSPENDED as @reinrich says, it is possible for someone to sneak in a second suspend request before us.
> 
> @dcubed-ojdk it seem like we could be posting JvmtiExport::post_monitor_contended_enter() from the ensure_join() which locks the threadObj.
> 
> So it might be best to treat this the same way as the others?

By "treat this the same way as the others", you mean check and return either
JVMTI_ERROR_THREAD_NOT_ALIVE or JVMTI_ERROR_THREAD_SUSPENDED as
appropriate when we get a false back from JvmtiSuspendControl::suspend(current)?

I'm not sure what this question is about:

> it seem like we could be posting JvmtiExport::post_monitor_contended_enter() from the ensure_join() which locks the threadObj.

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

PR: https://git.openjdk.java.net/jdk/pull/3191


More information about the serviceability-dev mailing list