RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v23]
Serguei Spitsyn
sspitsyn at openjdk.org
Tue Mar 12 02:07:24 UTC 2024
On Mon, 11 Mar 2024 18:05:00 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> Serguei Spitsyn has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 26 commits:
>>
>> - Merge
>> - review: minor tweak in test description of ObjectMonitorUsage.java
>> - review: addressed more comments on the fix and new test
>> - rename after merge: jvmti_common.h to jvmti_common.hpp
>> - Merge
>> - review: update comment in threads.hpp
>> - fix deadlock with carrier threads starvation in ObjectMonitorUsage test
>> - resolve merge conflict for deleted file objmonusage003.cpp
>> - fix a typo in libObjectMonitorUsage.cpp
>> - fix potential sync gap in the test ObjectMonitorUsage
>> - ... and 16 more: https://git.openjdk.org/jdk/compare/de428daf...b97b8205
>
> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1483:
>
>> 1481: markWord mark = hobj->mark();
>> 1482: ResourceMark rm(current_thread);
>> 1483: GrowableArray<JavaThread*>* wantList = nullptr;
>
> Thanks for refactoring `JvmtiEnvBase::get_object_monitor_usage()` to
> be much more clear. It was difficult to review in GitHub so I switched to
> the webrev frames view so that I could scroll the two sides back and forth
> and determine equivalence.
Good!
> src/hotspot/share/runtime/threads.hpp line 134:
>
>> 132: static unsigned print_threads_compiling(outputStream* st, char* buf, int buflen, bool short_form = false);
>> 133:
>> 134: // Get count Java threads that are waiting to enter or re-enter the specified monitor.
>
> nit typo: s/count Java/count of Java/
>
> Also this file needs a copyright year update.
Thanks, fixed now.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17680#discussion_r1520721501
PR Review Comment: https://git.openjdk.org/jdk/pull/17680#discussion_r1520722461
More information about the serviceability-dev
mailing list