Question about GetObjectMonitorUsage() JVMTI function
Yasumasa Suenaga
suenaga at oss.nttdata.com
Mon Jun 15 04:49:49 UTC 2020
Hi all,
I wonder why JvmtiEnvBase::get_object_monitor_usage() (implementation of GetObjectMonitorUsage()) does not perform at safepoint.
Monitor owner would be acquired from monitor object at first [1], but it would perform concurrently.
If owner thread is not suspended, the owner might be changed to others in subsequent code.
For example, the owner might release the monitor before [2].
Thanks,
Yasumasa
[1] http://hg.openjdk.java.net/jdk/jdk/file/76a17c8143d8/src/hotspot/share/prims/jvmtiEnvBase.cpp#l973
[2] http://hg.openjdk.java.net/jdk/jdk/file/76a17c8143d8/src/hotspot/share/prims/jvmtiEnvBase.cpp#l996
More information about the serviceability-dev
mailing list