RFR: 8332923: ObjectMonitorUsage.java failed with unexpected waiter_count [v3]

SendaoYan syan at openjdk.org
Thu May 30 01:13:20 UTC 2024


> Hi all,
>   ObjectMonitorUsage.java failed with `unexpected waiter_count` after [JDK-8328083](https://bugs.openjdk.org/browse/JDK-8328083) on linux x86_32.
>   There are two changes in this PR:
> 1. In JvmtiEnvBase::get_object_monitor_usage function, change from `java_lang_VirtualThread::is_instance(thread_oop)` to `thread_oop->is_a(vmClasses::BaseVirtualThread_klass())`to support the alternative implementation.
> 2. The JvmtiEnvBase::get_object_monitor_usage does take the vthread into consideration when calculating nWant(mon->contentions()).
> 
>   
> 
> Additional testing:
> - [ ] linux x86_32 run all testcases in serviceability/jvmti, all testcases run successed expect `serviceability/jvmti/vthread/GetThreadState/GetThreadStateTest.java#default` run failed. This test also run failed before this PR, which has been recorded in [JDK-8333140](https://bugs.openjdk.org/browse/JDK-8333140)
> - [ ] linux x86_64 run all testcases in serviceability/jvmti, all testcases run successed.
> 
> [x64.log](https://github.com/openjdk/jdk/files/15480081/x64.log)
> [x86.log](https://github.com/openjdk/jdk/files/15480083/x86.log)

SendaoYan has updated the pull request incrementally with one additional commit since the last revision:

  change from java_lang_VirtualThread::is_instance(thread_oop) to hread_oop->is_a(vmClasses::BaseVirtualThread_klass()) in Threads::get_pending_threads()

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/19405/files
  - new: https://git.openjdk.org/jdk/pull/19405/files/ea28c232..83521f47

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=19405&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19405&range=01-02

  Stats: 10 lines in 2 files changed: 0 ins; 8 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/19405.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19405/head:pull/19405

PR: https://git.openjdk.org/jdk/pull/19405


More information about the serviceability-dev mailing list