8206254: Unable to complete emergency dump during safepoint
authormgronlun
Wed, 04 Jul 2018 10:24:16 +0200
changeset 50977 ab9312fac8eb
parent 50976 59ee619866c3
child 50978 a63f6915a1f9
8206254: Unable to complete emergency dump during safepoint Reviewed-by: egahlin
src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeManager.cpp
--- a/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeManager.cpp	Wed Jul 04 09:21:19 2018 +0200
+++ b/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeManager.cpp	Wed Jul 04 10:24:16 2018 +0200
@@ -148,9 +148,8 @@
 }
 
 void JfrTypeManager::write_type_set() {
-  assert(!SafepointSynchronize::is_at_safepoint(), "invariant");
   // can safepoint here because of Module_lock
-  MutexLockerEx lock(Module_lock);
+  MutexLockerEx lock(SafepointSynchronize::is_at_safepoint() ? NULL : Module_lock);
   JfrCheckpointWriter writer(true, true, Thread::current());
   TypeSet set;
   set.serialize(writer);