// For safety, only iterate over a class if its loader is alive. // This function must be called only inside a safepoint, where the value of // k->is_loader_alive() will not change. template<typename Function> void DumpTimeSharedClassTable::iterate_all_live_classes(Function function) const { auto wrapper = [&] (InstanceKlass* k, DumpTimeClassInfo& info) {
assert(SafepointSynchronize::is_at_safepoint(), "invariant");
assert_lock_strong(DumpTimeTable_lock); if (k->is_loader_alive()) {
function(k, info);
assert(k->is_loader_alive(), "must not change");
} else { if (!SystemDictionaryShared::is_excluded_class(k)) {
SystemDictionaryShared::warn_excluded(k, "Class loader not alive");
SystemDictionaryShared::set_excluded_locked(k);
}
}
};
DumpTimeSharedClassTableBaseType::iterate_all(wrapper);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.