src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp
branchJEP-349-branch
changeset 57991 a101d496334a
parent 57983 a57907813a83
child 57992 f2f7cb0f1a0f
--- a/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp	Tue Sep 03 14:05:01 2019 +0200
+++ b/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp	Tue Sep 03 14:36:15 2019 +0200
@@ -53,6 +53,13 @@
 typedef const JfrSymbolId::SymbolEntry* SymbolEntryPtr;
 typedef const JfrSymbolId::CStringEntry* CStringEntryPtr;
 
+static JfrCheckpointWriter* _writer = NULL;
+static JfrCheckpointWriter* _leakp_writer = NULL;
+static JfrArtifactSet* _artifacts = NULL;
+static JfrArtifactClosure* _subsystem_callback = NULL;
+static bool _class_unload = false;
+static bool _flushpoint = false;
+
 // incremented on each rotation
 static u8 checkpoint_id = 1;
 
@@ -64,13 +71,6 @@
   return artifact_id != 0 ? CREATE_SYMBOL_ID(artifact_id) : 0;
 }
 
-static JfrCheckpointWriter* _writer = NULL;
-static JfrCheckpointWriter* _leakp_writer = NULL;
-static bool _class_unload = false;
-static bool _flushpoint = false;
-static JfrArtifactSet* _artifacts = NULL;
-static JfrArtifactClosure* _subsystem_callback = NULL;
-
 static bool current_epoch() {
   return _class_unload || _flushpoint;
 }
@@ -156,7 +156,7 @@
   assert(IS_LEAKP(value), "invariant");
 }
 
-static void tag_leakp_klass_artifacts(KlassPtr k, bool class_unload) {
+static void tag_leakp_klass_artifacts(KlassPtr k) {
   assert(k != NULL, "invariant");
   PkgPtr pkg = k->package();
   if (pkg != NULL) {
@@ -174,12 +174,11 @@
 }
 
 class TagLeakpKlassArtifact {
-  bool _class_unload;
-public:
-  TagLeakpKlassArtifact(bool class_unload) : _class_unload(class_unload) {}
+ public:
+  TagLeakpKlassArtifact(bool class_unload) {}
   bool operator()(KlassPtr klass) {
     if (IS_LEAKP(klass)) {
-      tag_leakp_klass_artifacts(klass, _class_unload);
+      tag_leakp_klass_artifacts(klass);
     }
     return true;
   }