< prev index next >

src/hotspot/share/classfile/systemDictionary.hpp

Print this page
rev 59635 : [mq]: cds_lambda


 115 //         an entry  (an entry cannot be deleted from under a reader)
 116 //    - entries must be fully formed before they are available to concurrent
 117 //         readers (we must ensure write ordering)
 118 //
 119 // Note that placeholders are deleted at any time, as they are removed
 120 // when a class is completely loaded. Therefore, readers as well as writers
 121 // of placeholders must hold the SystemDictionary_lock.
 122 //
 123 
 124 class BootstrapInfo;
 125 class ClassFileStream;
 126 class Dictionary;
 127 class PlaceholderTable;
 128 class LoaderConstraintTable;
 129 template <MEMFLAGS F> class HashtableBucket;
 130 class ResolutionErrorTable;
 131 class SymbolPropertyTable;
 132 class ProtectionDomainCacheTable;
 133 class ProtectionDomainCacheEntry;
 134 class GCTimer;

 135 
 136 #define WK_KLASS_ENUM_NAME(kname)    kname##_knum
 137 
 138 // Certain classes, such as java.lang.Object and java.lang.String,
 139 // are "well-known", in the sense that no class loader is allowed
 140 // to provide a different definition.
 141 //
 142 // Each well-known class has a short klass name (like object_klass),
 143 // and a vmSymbol name (like java_lang_Object).
 144 //
 145 // The order of these definitions is significant: the classes are
 146 // resolved during early VM start-up by resolve_well_known_classes
 147 // in this order. Changing the order may require careful restructuring
 148 // of the VM start-up sequence.
 149 //
 150 #define WK_KLASSES_DO(do_klass)                                                                                 \
 151   /* well-known classes */                                                                                      \
 152   do_klass(Object_klass,                                java_lang_Object                                      ) \
 153   do_klass(String_klass,                                java_lang_String                                      ) \
 154   do_klass(Class_klass,                                 java_lang_Class                                       ) \


 589   // Resolution errors
 590   static ResolutionErrorTable*   _resolution_errors;
 591 
 592   // Invoke methods (JSR 292)
 593   static SymbolPropertyTable*    _invoke_method_table;
 594 
 595   // ProtectionDomain cache
 596   static ProtectionDomainCacheTable*   _pd_cache_table;
 597 
 598 protected:
 599   static void validate_protection_domain(InstanceKlass* klass,
 600                                          Handle class_loader,
 601                                          Handle protection_domain, TRAPS);
 602 
 603   friend class VM_PopulateDumpSharedSpace;
 604   friend class TraversePlaceholdersClosure;
 605   static PlaceholderTable*   placeholders() { return _placeholders; }
 606   static LoaderConstraintTable* constraints() { return _loader_constraints; }
 607   static ResolutionErrorTable* resolution_errors() { return _resolution_errors; }
 608   static SymbolPropertyTable* invoke_method_table() { return _invoke_method_table; }

 609 
 610   // Basic loading operations
 611   static InstanceKlass* resolve_instance_class_or_null_helper(Symbol* name,
 612                                                               Handle class_loader,
 613                                                               Handle protection_domain,
 614                                                               TRAPS);
 615   static InstanceKlass* resolve_instance_class_or_null(Symbol* class_name, Handle class_loader, Handle protection_domain, TRAPS);
 616   static Klass* resolve_array_class_or_null(Symbol* class_name, Handle class_loader, Handle protection_domain, TRAPS);
 617   static InstanceKlass* handle_parallel_super_load(Symbol* class_name, Symbol* supername, Handle class_loader, Handle protection_domain, Handle lockObject, TRAPS);
 618   // Wait on SystemDictionary_lock; unlocks lockObject before
 619   // waiting; relocks lockObject with correct recursion count
 620   // after waiting, but before reentering SystemDictionary_lock
 621   // to preserve lock order semantics.
 622   static void double_lock_wait(Handle lockObject, TRAPS);
 623   static void define_instance_class(InstanceKlass* k, TRAPS);
 624   static InstanceKlass* find_or_define_instance_class(Symbol* class_name,
 625                                                 Handle class_loader,
 626                                                 InstanceKlass* k, TRAPS);
 627   static bool is_shared_class_visible(Symbol* class_name, InstanceKlass* ik,
 628                                       PackageEntry* pkg_entry,
 629                                       Handle class_loader, TRAPS);
 630   static bool check_shared_class_super_type(InstanceKlass* child, InstanceKlass* super,
 631                                             Handle class_loader,  Handle protection_domain,
 632                                             bool is_superclass, TRAPS);
 633   static bool check_shared_class_super_types(InstanceKlass* ik, Handle class_loader,
 634                                                Handle protection_domain, TRAPS);





 635   static InstanceKlass* load_shared_class(InstanceKlass* ik,
 636                                           Handle class_loader,
 637                                           Handle protection_domain,
 638                                           const ClassFileStream *cfs,
 639                                           PackageEntry* pkg_entry,
 640                                           TRAPS);
 641   // Second part of load_shared_class
 642   static void load_shared_class_misc(InstanceKlass* ik, ClassLoaderData* loader_data, TRAPS) NOT_CDS_RETURN;
 643   static InstanceKlass* load_shared_boot_class(Symbol* class_name,
 644                                                PackageEntry* pkg_entry,
 645                                                TRAPS);
 646   static InstanceKlass* load_instance_class(Symbol* class_name, Handle class_loader, TRAPS);
 647   static Handle compute_loader_lock_object(Handle class_loader, TRAPS);
 648   static void check_loader_lock_contention(Handle loader_lock, TRAPS);
 649   static bool is_parallelCapable(Handle class_loader);
 650   static bool is_parallelDefine(Handle class_loader);
 651 
 652 public:
 653   static bool is_system_class_loader(oop class_loader);
 654   static bool is_platform_class_loader(oop class_loader);




 115 //         an entry  (an entry cannot be deleted from under a reader)
 116 //    - entries must be fully formed before they are available to concurrent
 117 //         readers (we must ensure write ordering)
 118 //
 119 // Note that placeholders are deleted at any time, as they are removed
 120 // when a class is completely loaded. Therefore, readers as well as writers
 121 // of placeholders must hold the SystemDictionary_lock.
 122 //
 123 
 124 class BootstrapInfo;
 125 class ClassFileStream;
 126 class Dictionary;
 127 class PlaceholderTable;
 128 class LoaderConstraintTable;
 129 template <MEMFLAGS F> class HashtableBucket;
 130 class ResolutionErrorTable;
 131 class SymbolPropertyTable;
 132 class ProtectionDomainCacheTable;
 133 class ProtectionDomainCacheEntry;
 134 class GCTimer;
 135 class EventClassLoad;
 136 
 137 #define WK_KLASS_ENUM_NAME(kname)    kname##_knum
 138 
 139 // Certain classes, such as java.lang.Object and java.lang.String,
 140 // are "well-known", in the sense that no class loader is allowed
 141 // to provide a different definition.
 142 //
 143 // Each well-known class has a short klass name (like object_klass),
 144 // and a vmSymbol name (like java_lang_Object).
 145 //
 146 // The order of these definitions is significant: the classes are
 147 // resolved during early VM start-up by resolve_well_known_classes
 148 // in this order. Changing the order may require careful restructuring
 149 // of the VM start-up sequence.
 150 //
 151 #define WK_KLASSES_DO(do_klass)                                                                                 \
 152   /* well-known classes */                                                                                      \
 153   do_klass(Object_klass,                                java_lang_Object                                      ) \
 154   do_klass(String_klass,                                java_lang_String                                      ) \
 155   do_klass(Class_klass,                                 java_lang_Class                                       ) \


 590   // Resolution errors
 591   static ResolutionErrorTable*   _resolution_errors;
 592 
 593   // Invoke methods (JSR 292)
 594   static SymbolPropertyTable*    _invoke_method_table;
 595 
 596   // ProtectionDomain cache
 597   static ProtectionDomainCacheTable*   _pd_cache_table;
 598 
 599 protected:
 600   static void validate_protection_domain(InstanceKlass* klass,
 601                                          Handle class_loader,
 602                                          Handle protection_domain, TRAPS);
 603 
 604   friend class VM_PopulateDumpSharedSpace;
 605   friend class TraversePlaceholdersClosure;
 606   static PlaceholderTable*   placeholders() { return _placeholders; }
 607   static LoaderConstraintTable* constraints() { return _loader_constraints; }
 608   static ResolutionErrorTable* resolution_errors() { return _resolution_errors; }
 609   static SymbolPropertyTable* invoke_method_table() { return _invoke_method_table; }
 610   static void post_class_load_event(EventClassLoad* event, const InstanceKlass* k, const ClassLoaderData* init_cld);
 611 
 612   // Basic loading operations
 613   static InstanceKlass* resolve_instance_class_or_null_helper(Symbol* name,
 614                                                               Handle class_loader,
 615                                                               Handle protection_domain,
 616                                                               TRAPS);
 617   static InstanceKlass* resolve_instance_class_or_null(Symbol* class_name, Handle class_loader, Handle protection_domain, TRAPS);
 618   static Klass* resolve_array_class_or_null(Symbol* class_name, Handle class_loader, Handle protection_domain, TRAPS);
 619   static InstanceKlass* handle_parallel_super_load(Symbol* class_name, Symbol* supername, Handle class_loader, Handle protection_domain, Handle lockObject, TRAPS);
 620   // Wait on SystemDictionary_lock; unlocks lockObject before
 621   // waiting; relocks lockObject with correct recursion count
 622   // after waiting, but before reentering SystemDictionary_lock
 623   // to preserve lock order semantics.
 624   static void double_lock_wait(Handle lockObject, TRAPS);
 625   static void define_instance_class(InstanceKlass* k, TRAPS);
 626   static InstanceKlass* find_or_define_instance_class(Symbol* class_name,
 627                                                 Handle class_loader,
 628                                                 InstanceKlass* k, TRAPS);
 629   static bool is_shared_class_visible(Symbol* class_name, InstanceKlass* ik,
 630                                       PackageEntry* pkg_entry,
 631                                       Handle class_loader, TRAPS);
 632   static bool check_shared_class_super_type(InstanceKlass* child, InstanceKlass* super,
 633                                             Handle class_loader,  Handle protection_domain,
 634                                             bool is_superclass, TRAPS);
 635   static bool check_shared_class_super_types(InstanceKlass* ik, Handle class_loader,
 636                                                Handle protection_domain, TRAPS);
 637   static InstanceKlass* load_shared_lambda_proxy_class(InstanceKlass* ik,
 638                                                        Handle class_loader,
 639                                                        Handle protection_domain,
 640                                                        PackageEntry* pkg_entry,
 641                                                        TRAPS);
 642   static InstanceKlass* load_shared_class(InstanceKlass* ik,
 643                                           Handle class_loader,
 644                                           Handle protection_domain,
 645                                           const ClassFileStream *cfs,
 646                                           PackageEntry* pkg_entry,
 647                                           TRAPS);
 648   // Second part of load_shared_class
 649   static void load_shared_class_misc(InstanceKlass* ik, ClassLoaderData* loader_data, TRAPS) NOT_CDS_RETURN;
 650   static InstanceKlass* load_shared_boot_class(Symbol* class_name,
 651                                                PackageEntry* pkg_entry,
 652                                                TRAPS);
 653   static InstanceKlass* load_instance_class(Symbol* class_name, Handle class_loader, TRAPS);
 654   static Handle compute_loader_lock_object(Handle class_loader, TRAPS);
 655   static void check_loader_lock_contention(Handle loader_lock, TRAPS);
 656   static bool is_parallelCapable(Handle class_loader);
 657   static bool is_parallelDefine(Handle class_loader);
 658 
 659 public:
 660   static bool is_system_class_loader(oop class_loader);
 661   static bool is_platform_class_loader(oop class_loader);


< prev index next >