RFR: 8212663: Remove conservative at_safepoint assert when JFR writes type sets during class unloading (original) (raw)

Erik Ă–sterlund erik.osterlund at oracle.com
Fri Oct 19 07:25:34 UTC 2018


Hi David,

Isn't the single thread call context the assumed default? In particular, this is called by SystemDictionary::do_unloading() only. And none of that stuff would work if called by multiple threads. So while it is indeed possible to distinguish the ZDriver thread as a special type of concurrent GC thread that also handles unloading, and verify there can only be one such thread with that role, for this assert, I'm not sure if it is worth the hassle as all code in the unloading path is single threaded anyway, and I can't see what is special about this code apart from that there was an assert there before and the other single threaded code did not. Do you agree?

Thanks, /Erik

On 2018-10-19 03:51, David Holmes wrote:

Hi Erik,

On 19/10/2018 1:00 AM, Erik Ă–sterlund wrote: Hi,

JFR writes type sets during class unloading. It currently asserts this is done in a safepoint. But in fact, it suffices that it is done by a single thread. This assert needs to be relaxed for concurrent class unloading. Okay but you removed it completely. Is there not something you can assert to verify your single thread requirement: Thread::current()->isVMthread() || Thread::current()->is classUnloaderthread() ?? Cheers, David Webrev: http://cr.openjdk.java.net/~eosterlund/8212663/webrev.00/ Bug: https://bugs.openjdk.java.net/browse/JDK-8212663 Thanks, /Erik



More information about the hotspot-runtime-dev mailing list