On Mon, 15 Apr 2024 06:47:24 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:
> This is the test issue. The `WaitingPT3` thread posted the `MonitorWait` > event but has not released the `lockCheck` monitor yet. It has been fixed to > wait for each `WaitingTask` thread to really reach the `WAITING` state. The > same approach is used for `EnteringTask` threads. It has been fixed to wait > for each `EnteringTask` thread to reach the `BLOCKED_ON_MONITOR` state. > > Testing: > - Reran the test > `serviceability/jvmti/ObjectMonitorUsage/ObjectMonitorUsage.java` locally > - TBD: submit the mach5 tiers 1-6 as well Changes requested by lmesnik (Reviewer). test/hotspot/jtreg/serviceability/jvmti/ObjectMonitorUsage/libObjectMonitorUsage.cpp line 183: > 181: > 182: static void wait_for_state(JNIEnv *jni, jthread thread, jint exp_state) { > 183: RawMonitorLocker rml(jvmti, jni, event_lock); The event_lock name is misleading, there are no events anymore. Also, I am not sure if this lock is needed at all. How it is used? I think that wait_for_state is a good candidate to be added in the library. With some additional doc about states. ------------- PR Review: https://git.openjdk.org/jdk/pull/18778#pullrequestreview-2002207716 PR Review Comment: https://git.openjdk.org/jdk/pull/18778#discussion_r1566464641