On 7/04/2021 5:08 pm, Robbin Ehn wrote:
On Wed, 7 Apr 2021 04:22:21 GMT, David Holmes <dhol...@openjdk.org> wrote:
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.
I'm also unclear what Robbin is referring to. I go back to my original comment
that surely JVMTI_ERROR_THREAD_NOT_ALIVE is impossible here?
We do a callback with a terminated thread, if the thread then in the agent
tries to suspend itself we should return JVMTI_ERROR_THREAD_NOT_ALIVE.
How can you do a callback on a terminated thread here? The thread should
only respond to the suspend request before it reaches the point in its
exit where it would report "not alive".
David
-------------
PR: https://git.openjdk.java.net/jdk/pull/3191