changeset 52212:e6973df15152

8212663: Remove conservative at_safepoint assert when JFR writes type sets during class unloading Reviewed-by: coleenp, dholmes, mgronlun
author eosterlund
date Mon, 22 Oct 2018 12:13:29 +0200
parents f298d05357fe
children 51c0b3936f01
files src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeManager.cpp
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp	Mon Oct 22 12:25:31 2018 +0100
+++ b/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp	Mon Oct 22 12:13:29 2018 +0200
@@ -367,7 +367,7 @@
 }
 
 void JfrCheckpointManager::write_type_set_for_unloaded_classes() {
-  assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint!");
+  assert_locked_or_safepoint(ClassLoaderDataGraph_lock);
   JfrTypeManager::write_type_set_for_unloaded_classes();
 }
 
--- a/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeManager.cpp	Mon Oct 22 12:25:31 2018 +0100
+++ b/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeManager.cpp	Mon Oct 22 12:13:29 2018 +0200
@@ -158,7 +158,7 @@
 }
 
 void JfrTypeManager::write_type_set_for_unloaded_classes() {
-  assert(SafepointSynchronize::is_at_safepoint(), "invariant");
+  assert_locked_or_safepoint(ClassLoaderDataGraph_lock);
   JfrCheckpointWriter writer(false, true, Thread::current());
   ClassUnloadTypeSet class_unload_set;
   class_unload_set.serialize(writer);