< prev index next >

src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp

Print this page

        

*** 75,85 **** return pkg_entry == NULL ? 0 : TRACE_ID(pkg_entry); } static traceid cld_id(CldPtr cld) { assert(cld != NULL, "invariant"); ! return cld->is_unsafe_anonymous() ? 0 : TRACE_ID(cld); } static void tag_leakp_klass_artifacts(KlassPtr k, bool class_unload) { assert(k != NULL, "invariant"); PkgPtr pkg = k->package(); --- 75,85 ---- return pkg_entry == NULL ? 0 : TRACE_ID(pkg_entry); } static traceid cld_id(CldPtr cld) { assert(cld != NULL, "invariant"); ! return cld->is_shortlived() ? 0 : TRACE_ID(cld); } static void tag_leakp_klass_artifacts(KlassPtr k, bool class_unload) { assert(k != NULL, "invariant"); PkgPtr pkg = k->package();
*** 90,100 **** tag_leakp_artifact(module, class_unload); } } CldPtr cld = k->class_loader_data(); assert(cld != NULL, "invariant"); ! if (!cld->is_unsafe_anonymous()) { tag_leakp_artifact(cld, class_unload); } } class TagLeakpKlassArtifact { --- 90,100 ---- tag_leakp_artifact(module, class_unload); } } CldPtr cld = k->class_loader_data(); assert(cld != NULL, "invariant"); ! if (!cld->is_shortlived()) { tag_leakp_artifact(cld, class_unload); } } class TagLeakpKlassArtifact {
*** 228,238 **** typedef JfrArtifactWriterHost<ModuleWriterImpl, TYPE_MODULE> ModuleWriter; int write__artifact__classloader(JfrCheckpointWriter* writer, JfrArtifactSet* artifacts, const void* c) { assert(c != NULL, "invariant"); CldPtr cld = (CldPtr)c; ! assert(!cld->is_unsafe_anonymous(), "invariant"); const traceid cld_id = TRACE_ID(cld); // class loader type const Klass* class_loader_klass = cld->class_loader_klass(); if (class_loader_klass == NULL) { // (primordial) boot class loader --- 228,238 ---- typedef JfrArtifactWriterHost<ModuleWriterImpl, TYPE_MODULE> ModuleWriter; int write__artifact__classloader(JfrCheckpointWriter* writer, JfrArtifactSet* artifacts, const void* c) { assert(c != NULL, "invariant"); CldPtr cld = (CldPtr)c; ! assert(!cld->is_shortlived(), "invariant"); const traceid cld_id = TRACE_ID(cld); // class loader type const Klass* class_loader_klass = cld->class_loader_klass(); if (class_loader_klass == NULL) { // (primordial) boot class loader
*** 356,366 **** count += module_symbols(module); } } CldPtr cld = klass->class_loader_data(); assert(cld != NULL, "invariant"); ! if (!cld->is_unsafe_anonymous()) { count += class_loader_symbols(cld); } if (_method_used_predicate(klass)) { count += method_symbols(klass); } --- 356,366 ---- count += module_symbols(module); } } CldPtr cld = klass->class_loader_data(); assert(cld != NULL, "invariant"); ! if (!cld->is_shortlived()) { count += class_loader_symbols(cld); } if (_method_used_predicate(klass)) { count += method_symbols(klass); }
*** 430,440 **** } template <template <typename> class Predicate> int KlassSymbolWriterImpl<Predicate>::class_loader_symbols(CldPtr cld) { assert(cld != NULL, "invariant"); ! assert(!cld->is_unsafe_anonymous(), "invariant"); int count = 0; // class loader type const Klass* class_loader_klass = cld->class_loader_klass(); if (class_loader_klass == NULL) { // (primordial) boot class loader --- 430,440 ---- } template <template <typename> class Predicate> int KlassSymbolWriterImpl<Predicate>::class_loader_symbols(CldPtr cld) { assert(cld != NULL, "invariant"); ! assert(!cld->is_shortlived(), "invariant"); int count = 0; // class loader type const Klass* class_loader_klass = cld->class_loader_klass(); if (class_loader_klass == NULL) { // (primordial) boot class loader
*** 694,704 **** public: typedef CldPtr TypePtr; static TypePtr select(KlassPtr klass) { assert(klass != NULL, "invariant"); CldPtr cld = klass->class_loader_data(); ! return cld->is_unsafe_anonymous() ? NULL : cld; } }; typedef KlassToFieldEnvelope<CldFieldSelector, CldWriterWithClear> KlassCldWriterWithClear; typedef KlassToFieldEnvelope<CldFieldSelector, CompositeCldWriterWithClear> KlassCompositeCldWriterWithClear; --- 694,704 ---- public: typedef CldPtr TypePtr; static TypePtr select(KlassPtr klass) { assert(klass != NULL, "invariant"); CldPtr cld = klass->class_loader_data(); ! return cld->is_shortlived() ? NULL : cld; } }; typedef KlassToFieldEnvelope<CldFieldSelector, CldWriterWithClear> KlassCldWriterWithClear; typedef KlassToFieldEnvelope<CldFieldSelector, CompositeCldWriterWithClear> KlassCompositeCldWriterWithClear;
*** 920,930 **** bool _class_unload; public: CLDCallback(bool class_unload) : _class_unload(class_unload) {} void do_cld(ClassLoaderData* cld) { assert(cld != NULL, "invariant"); ! if (cld->is_unsafe_anonymous()) { return; } if (_class_unload) { JfrTypeSet::do_unloaded_class_loader_data(cld); return; --- 920,930 ---- bool _class_unload; public: CLDCallback(bool class_unload) : _class_unload(class_unload) {} void do_cld(ClassLoaderData* cld) { assert(cld != NULL, "invariant"); ! if (cld->is_shortlived()) { return; } if (_class_unload) { JfrTypeSet::do_unloaded_class_loader_data(cld); return;
< prev index next >