RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v23]
Serguei Spitsyn
sspitsyn at openjdk.org
Tue Mar 12 02:16:23 UTC 2024
On Mon, 11 Mar 2024 18:44:34 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
>
> test/hotspot/jtreg/serviceability/jvmti/ObjectMonitorUsage/libObjectMonitorUsage.cpp line 215:
>
>> 213: if (tested_monitor != nullptr) {
>> 214: jni->DeleteGlobalRef(tested_monitor);
>> 215: }
>
> Since this is at the beginning of `setTestedMonitor` does it mean that we "leak"
> the last global ref?
Thank you for the check. There is no leak of the last global ref because there is always this call at the end of each sub-test: `setTestedMonitor(null)`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17680#discussion_r1520733090
More information about the serviceability-dev
mailing list