RFR (S) 8213723 / 8213893 - More Monitor/mutex initialization management
Thomas Schatzl
thomas.schatzl at oracle.com
Thu Nov 15 14:20:53 UTC 2018
Hi,
On Thu, 2018-11-15 at 14:24 +1000, David Holmes wrote:
> webrev: http://cr.openjdk.java.net/~dholmes/8213723/webrev/
>
> bug: https://bugs.openjdk.java.net/browse/JDK-8213723
>
> I found a bunch of mutex/monitor instances that are dynamically
> created and embedded in classes rather than being part of the global
> mutex table. This isn't necessarily a problem as long as they aren't
> created before the low-level mutex initialization code has executed.
> I added some debug code to verify no mutex/monitor is created before
> os::init_2() has executed (which is a constraint imposed by Solaris
> sync code being dependent on argument parsing).
>
> I found one mutex that was created too soon, and that was the
> NMTQuery_lock, so that is now moved to the global list in
> MutexLocker.
> It's only used with the NMT DCmd and so doesn't need to be created
> exceptionally early.
>
> Just a reminder we don't see any problems today because
> mutex/monitor construction is trivial and independent of everything
> else. But the mutex/monitor rewrite that is being worked on requires
> OS initialization of mutex related attributes.
>
> Also trivially fixed:
>
> https://bugs.openjdk.java.net/browse/JDK-8213893
>
> which deletes the unused StringTable_lock.
some minor nits:
- in the various os_* files, there is a typo, s/miror/mirror
- in os.hpp:97, the indentation of the newly added block is off
compared to the remainder of the class.
Looks good otherwise. Since these are trivial issues I do not need to
see the changes again.
Thomas
More information about the hotspot-runtime-dev
mailing list