RFR: 8271293: Monitor class should use ThreadBlockInVMPreprocess

Daniel D.Daugherty dcubed at openjdk.java.net
Thu Aug 5 16:18:29 UTC 2021


On Tue, 3 Aug 2021 22:35:43 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

> Hi,
> 
> Please review the following small patch which changes the Monitor class to use the more appropriate ThreadBlockInVMPreprocess transition wrapper instead of ThreadBlockInVM. This allows to remove the embedded InFlightMutexRelease object from ThreadBlockInVM and to move it, along with the definition of the InFlightMutexRelease class, to mutex.cpp where they belong.
> 
> I also changed the default value of allow_suspend to false, even though more users set it to true, to make it consistent with the fact that ThreadBlockInVM doesn't process suspend requests. This avoids having to think twice when looking at a ThreadBlockInVM* object as to whether it processes suspend requests or not. Suspend requests are never processed unless explicitly allowed.
> 
> I also changed ThreadBlockInVM to be a typedef to avoid declaring a wrapper class of ThreadBlockInVMPreprocess. 
> 
> Testing in mach5 tiers 1-3.
> 
> Thanks,
> Patricio

Thumbs up.

I like the cleanup and moving InFlightMutexRelease to be
more encapsulated (in mutex.cpp). Also, thanks for flipping
the default state for allow_suspend to false.

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

Marked as reviewed by dcubed (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/4978


More information about the hotspot-runtime-dev mailing list