8206254: Unable to complete emergency dump during safepoint

Reviewed-by: egahlin
This commit is contained in:
Markus Grönlund 2018-07-04 10:24:16 +02:00
parent 7cefb320e9
commit 84d23a1596

View File

@ -148,9 +148,8 @@ void JfrTypeManager::write_safepoint_types(JfrCheckpointWriter& writer) {
}
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);