RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage

Chris Plummer cjplummer at openjdk.org
Wed May 1 23:20:52 UTC 2024


On Wed, 1 May 2024 22:40:02 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

>> src/hotspot/share/prims/jvmti.xml line 8266:
>> 
>>> 8264:           <description>
>>> 8265:             The number of platform threads waiting to own this monitor,
>>> 8266:             or <code>0</code> if the monitor is owned by a virtual thread or not owned
>> 
>> Be consistent with above descriptions. They don't say "if the monitor is owned by". They say "if owned by".
>
> Good suggestion, thanks. But it is more "incorrect". It should say "is waited by" instead of "is owned by":
> 
>            The number of platform threads waiting to own this monitor, or <code>0</code>
>            if is waited by virtual threads only or no threads are waiting
> ``` 
> Are you okay with this correction?
> Or maybe we should say:
> 
>            The number of platform threads waiting to own this monitor, or <code>0</code>
>            if virtual threads only are waiting or no threads are waiting

Copy and paste issue on my part. I would use "if only virtual threads".

>> test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectMonitorUsage/objmonusage001.java line 65:
>> 
>>> 63:         }
>>> 64:         // Virtual threads are not supported by the GetObjectMonitorUsage. Correct
>>> 65:         // the expected values if the test is executed with MainWrapper=virtual.
>> 
>> "MainWrapper" is not the proper terminology any more.  It's "Test Thread Factory" (JTREG_TEST_THREAD_FACTORY=Virtual).
>
> Good suggestion, thanks. Then I'd suggest this:
> 
>         // Virtual threads are not supported by the GetObjectMonitorUsage.
>         // Correct the expected values if the test is executed with the
>         // JTREG_TEST_THREAD_FACTORY=Virtual.

You can drop "the" from "with the JTREG_TEST_THREAD_FACTORY=Virtual"

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19030#discussion_r1586913098
PR Review Comment: https://git.openjdk.org/jdk/pull/19030#discussion_r1586913936


More information about the serviceability-dev mailing list