clear_artifacts in the correct location JEP-349-branch
authormgronlun
Sun, 22 Sep 2019 17:31:57 +0200
branchJEP-349-branch
changeset 58259 b6efcf2217f1
parent 58258 48aabad45dac
child 58271 e47423f1318b
clear_artifacts in the correct location
src/hotspot/share/jfr/jfr.cpp
src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp
--- a/src/hotspot/share/jfr/jfr.cpp	Sun Sep 22 15:38:32 2019 +0200
+++ b/src/hotspot/share/jfr/jfr.cpp	Sun Sep 22 17:31:57 2019 +0200
@@ -58,7 +58,7 @@
 }
 
 void Jfr::on_unloading_classes() {
-  if (JfrRecorder::is_recording()) {
+  if (JfrRecorder::is_created()) {
     JfrCheckpointManager::write_type_set_for_unloaded_classes();
   }
 }
--- a/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp	Sun Sep 22 15:38:32 2019 +0200
+++ b/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp	Sun Sep 22 17:31:57 2019 +0200
@@ -856,8 +856,8 @@
     _artifacts = new JfrArtifactSet(class_unload);
   } else {
     _artifacts->initialize(class_unload, clear_artifacts);
-    clear_artifacts = false;
   }
+  clear_artifacts = false;
   assert(_artifacts != NULL, "invariant");
   assert(!_artifacts->has_klass_entries(), "invariant");
 }