Lock-based vs lock-free MethodCounters initialization
David Chase
david.r.chase at oracle.com
Mon May 12 11:42:12 UTC 2014
On 2014-05-12, at 7:19 AM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
> Lock-free solution doesn't suffer from deadlocks, but it can increase Metaspace fragmentation due to failed CAS updates and subsequent deallocations.
>
> I'm in favor of lock-free solution, but not sure about how serious fragmentation issue is in NPG world. What do you think?
I would try lock-free, because fragmentation is not as bad as deadlock. Would be interesting to define a benchmark/test that ought to thrash that lock to see if this turns out to matter anyhow.
David
More information about the hotspot-dev
mailing list