RFR: 8212748: ZGC: Add reentrant locking functionality
Per Liden
per.liden at oracle.com
Thu Oct 25 15:27:23 UTC 2018
Hi Erik,
On 2018-10-25 15:44, Erik Österlund wrote:
> Hi,
>
> ZGC needs a per-nmethod lock to be used for concurrent IC cleaning,
> protecting misaligned oops from concurrently being patched by nmethod
> entry barriers, and read using CompiledMethod::is_unloading(), with
> interactions crossing JavaThreads and non-Java threads. This patch adds
> that utility.
>
> Webrev:
> http://cr.openjdk.java.net/~eosterlund/8212748/webrev.00/
I'd like to suggest that ZReentrantLock doens't inherit from ZLock, but
that it instead has a ZLock. And that ZLocker is adjusted to take a T*
instead of a ZLock*.
Also, I'm not sure I see the need for the reentrant_lock() function.
Shouldn't we just have a lock counter and let lock/unlock do the right
thing?
cheers,
Per
>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8212748
>
> Thanks,
> /Erik
More information about the hotspot-gc-dev
mailing list