RFR: 8212748: ZGC: Add reentrant locking functionality
per.liden at oracle.com
Thu Oct 25 15:27:23 UTC 2018
On 2018-10-25 15:44, Erik Österlund wrote:
> 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.
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
More information about the hotspot-gc-dev