RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v9]

Serguei Spitsyn sspitsyn at openjdk.org
Mon Feb 19 13:28:56 UTC 2024


On Fri, 16 Feb 2024 06:01:19 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   review: JDWP monitor_info spec clarification; removed debugging code from objmonusage001
>
> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1496:
> 
>> 1494:   nWant = wantList->length();
>> 1495: 
>> 1496:   if (mon != nullptr) {
> 
> Shouldn't the call to `get_pending_threads` only happen if `mon != nullptr`? Otherwise the `wantList` has to be empty.

Good catch. I've moved it under the `if (mon != nullptr) {` condition.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17680#discussion_r1494547012


More information about the serviceability-dev mailing list