--- 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);