Description
GetObjectMonitorUsage() JVMTI function is expected to return information which an accurate snapshot of the state of the monitor at some point in time, but it does not ensure that in the current implementation.
This function is implemented to use JvmtiEnvBase::get_object_monitor_usage(). It tries to
gather the relevant information without going to a safepoint, but under certain conditions it
recognizes that going to a safepoint is necessary in order to gather stable information.
Subsequent analysis has shown that the code paths where a safepoint is not used can
result in unstable information being returned.
See the discussion in serviceability-dev for more details:
https://mail.openjdk.java.net/pipermail/serviceability-dev/2020-June/031876.html
This function is implemented to use JvmtiEnvBase::get_object_monitor_usage(). It tries to
gather the relevant information without going to a safepoint, but under certain conditions it
recognizes that going to a safepoint is necessary in order to gather stable information.
Subsequent analysis has shown that the code paths where a safepoint is not used can
result in unstable information being returned.
See the discussion in serviceability-dev for more details:
https://mail.openjdk.java.net/pipermail/serviceability-dev/2020-June/031876.html