CMS parallel initial mark; vm thread sneaking in Thread::try_lock()
yamauchi at google.com
Wed Jun 19 10:39:42 PDT 2013
> > Now, if I comment out the assert, it seems to work (though I haven't
> > tested it very long.) This may be good if in fact sneak won't happen
> > with try_lock()/unlock() only.
> > I haven't tried this, but another potential approach might be to give
> > up sampling (just return) if it's called by the VM thread at a
> > safepoint, though the VM thread might allocate a large object, and the
> > evenness of the sample distribution could suffer to some extent.
> I'd just remove the assert :)
> As already mentioned multiple times, try_lock() does never actually
> block the thread, so the vm thread cannot actually sneak, as you already
> noticed in your question to David, and he confirmed. The guarded code
> can also never block, it's just a few assignments.
Removing the assert sounds good to me.
Jon, what do you think?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-runtime-dev