class ConstantPool; class constantPoolHandle; class InstanceKlass; class Klass;
// ClassPrelinker is used to perform ahead-of-time linking of ConstantPool entries // for archived InstanceKlasses. // // At run time, Java classes are loaded dynamically and may be replaced with JVMTI. // Therefore, we take care to prelink only the ConstantPool entries that are // guatanteed to resolve to the same results at both dump time and run time. // // For example, a JVM_CONSTANT_Class reference to a supertype can be safely resolved // at dump time, because at run time we will load a class from the CDS archive only // if all of its supertypes are loaded from the CDS archive. class ClassPrelinker : AllStatic { using ClassesTable = ResourceHashtable<InstanceKlass*, bool, 15889, AnyObj::C_HEAP, mtClassShared> ; static ClassesTable* _processed_classes; static ClassesTable* _vm_classes;
// Is this class resolved as part of vmClasses::resolve_all()? If so, these // classes are guatanteed to be loaded at runtime (and cannot be replaced by JVMTI) // when CDS is enabled. Therefore, we can safely keep a direct reference to these // classes. staticbool is_vm_class(InstanceKlass* ik);
// Resolve all constant pool entries that are safe to be stored in the // CDS archive. staticvoid dumptime_resolve_constants(InstanceKlass* ik, TRAPS);
// Can we resolve the klass entry at cp_index in this constant pool, and store // the result in the CDS archive? Returns true if cp_index is guaranteed to // resolve to the same InstanceKlass* at both dump time and run time. staticbool can_archive_resolved_klass(ConstantPool* cp, int cp_index);
};
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.