Summary: Add local deferred event list to thread to post events outside CodeCache_lock.

This patch builds on the patch for JDK-8173361.  With this patch, I made the JvmtiDeferredEventQueue an instance class (not AllStatic) and have one per thread.  The CodeBlob event that used to drop the CodeCache_lock and raced with the sweeper thread, adds the events it wants to post to its thread local list, and processes it outside the lock.  The list is walked in GC and by the sweeper to keep the nmethods from being unloaded and zombied, respectively.

Also, the jmethod_id field in nmethod was only used as a boolean so don't create a jmethod_id until needed for post_compiled_method_unload.

Ran hs tier1-8 on linux-x64-debug and the stress test that crashed in the original bug report.

open webrev at http://cr.openjdk.java.net/~coleenp/2019/8212160.01/webrev
bug link https://bugs.openjdk.java.net/browse/JDK-8212160

Thanks,
Coleen

Reply via email to