RFR: 8238761: Asynchronous handshakes [v8]

Robbin Ehn rehn at openjdk.java.net
Mon Sep 28 19:18:12 UTC 2020


On Mon, 28 Sep 2020 18:20:58 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

> Robbin, thank you for your answers!
> There are JVMTI functions that are specified to return error code JVMTI_ERROR_THREAD_NOT_ALIVE.
> As an example, see:
> https://docs.oracle.com/en/java/javase/15/docs/specs/jvmti.html#GetStackTrace
> The following functions are impacted by your fix:
> GetOwnedMonitorInfo, GetOwnedMonitorStackDepthInfo, GetCurrentContendedMonitor, GetStackTrace, GetFrameCount,
> GetFrameLocation, PopFrame
> I wonder, how this error code can be ever returned for these functions now.

They should have exactly the same behavior as previously.
All I did was set JVMTI_ERROR_THREAD_NOT_ALIVE as the default value for those handshakes:
https://github.com/openjdk/jdk/blob/3a95750e6474214c62b04fccbfe172d077d3915f/src/hotspot/share/prims/jvmtiEnvBase.hpp#L345
Which simplifies the code.
So only in the two cases where the guarantee's are we can never return that
(reset_current_location/enter_interp_only_mode)

If the guarantee's are wrong, the current code have that bug already, so I'm not adding or fixing that.

It should be exactly the same and we have test for at least some of the operations which verifies that the agent gets:
JVMTI_ERROR_THREAD_NOT_ALIVE

And this passes t1-8 multiple times, so I'm pretty confident that this does not change any return value.

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

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


More information about the serviceability-dev mailing list