# HG changeset patch # User mgronlun # Date 1567514175 -7200 # Node ID a101d496334a40ba97ded0737f9d23f41517b17a # Parent b08487c6eb4d6ffa571aa54d15382240de78eb0b cleanup diff -r b08487c6eb4d -r a101d496334a src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp --- 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; } diff -r b08487c6eb4d -r a101d496334a src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSetUtils.hpp --- a/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSetUtils.hpp Tue Sep 03 14:05:01 2019 +0200 +++ b/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSetUtils.hpp Tue Sep 03 14:36:15 2019 +0200 @@ -185,34 +185,6 @@ } }; -template -class UniquePredicate { - private: - GrowableArray _seen; - public: - UniquePredicate(bool) : _seen() {} - bool operator()(T const& value) { - bool not_unique; - _seen.template find_sorted(value, not_unique); - if (not_unique) { - return false; - } - _seen.template insert_sorted(value); - return true; - } -}; - -template -class CompositeLeakPredicate { - LeakPredicate _leak_predicate; - UniquePredicate _unique; - public: - CompositeLeakPredicate(bool class_unload) : _leak_predicate(class_unload), _unique(class_unload) {} - bool operator()(T const& value) { - return _leak_predicate(value) && _unique(value); - } -}; - template class ListEntry : public JfrHashtableEntry { public: