RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v2]
Chris Plummer
cjplummer at openjdk.org
Thu May 2 21:38:53 UTC 2024
On Thu, 2 May 2024 06:45:39 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
>> test/hotspot/jtreg/serviceability/jvmti/ObjectMonitorUsage/ObjectMonitorUsage.java line 257:
>>
>>> 255: // Correct the expected values for the virtual thread case.
>>> 256: int expEnteringCount = isVirtual ? 0 : NUMBER_OF_ENTERING_THREADS;
>>> 257: int expWaitingCount = isVirtual ? 0 : NUMBER_OF_WAITING_THREADS;
>>
>> There are comments below that still reference NUMBER_OF_ENTERING_THREADS and NUMBER_OF_WAITING_THREADS.
>
> Thank you for the comment. In fact, I don't know how to fix it.
> Replacing of NUMBER_OF_ENTERING_THREADS/NUMBER_OF_WAITING_THREADS in comments with `expEnteringCount/expWaitingCount` does not make sense to me. The comments are about the tested pattern, not about the real values. Please, let me know if you have any suggestion on fixing.
expEnteringCount/expWaitingCount contain the tested patterns. I don't see why they can't just replace NUMBER_OF_ENTERING_THREADS/NUMBER_OF_WAITING_THREADS in the comments also. In fact it is confusing if you don't because code right below the comments references expEnteringCount/expWaitingCount, not NUMBER_OF_ENTERING_THREADS/NUMBER_OF_WAITING_THREADS.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19030#discussion_r1588440431
More information about the hotspot-dev
mailing list