< prev index next >

src/share/vm/classfile/systemDictionary.hpp

Print this page




 334   // If both functions return non-null, they must return the same value.
 335   // Also, the unchecked version may sometimes be non-null where the
 336   // checked version is null.  This can occur in several ways:
 337   //   1. No query has yet been made to the class loader.
 338   //   2. The class loader was queried, but chose not to delegate.
 339   //   3. ClassLoader.checkPackageAccess rejected a proposed protection domain.
 340   //   4. Loading was attempted, but there was a linkage error of some sort.
 341   // In all of these cases, the loader constraints on this type are
 342   // satisfied, and it is safe for classes in the given class loader
 343   // to manipulate strongly-typed values of the found class, subject
 344   // to local linkage and access checks.
 345   static Klass* find_constrained_instance_or_array_klass(Symbol* class_name,
 346                                                            Handle class_loader,
 347                                                            TRAPS);
 348 
 349   // Iterate over all klasses in dictionary
 350   //   Just the classes from defining class loaders
 351   static void classes_do(void f(Klass*));
 352   // Added for initialize_itable_for_klass to handle exceptions
 353   static void classes_do(void f(Klass*, TRAPS), TRAPS);
 354   //   All classes, and their class loaders
 355   static void classes_do(void f(Klass*, ClassLoaderData*));
 356 
 357   static void placeholders_do(void f(Symbol*));
 358 
 359   // Iterate over all methods in all klasses in dictionary
 360   static void methods_do(void f(Method*));
 361 
 362   // Garbage collection support
 363 
 364   // This method applies "blk->do_oop" to all the pointers to "system"
 365   // classes and loaders.
 366   static void always_strong_oops_do(OopClosure* blk);
 367   static void always_strong_classes_do(KlassClosure* closure);
 368 
 369   // Unload (that is, break root links to) all unmarked classes and
 370   // loaders.  Returns "true" iff something was unloaded.
 371   static bool do_unloading(BoolObjectClosure* is_alive,
 372                            bool clean_previous_versions = true);
 373 
 374   // Used by DumpSharedSpaces only to remove classes that failed verification
 375   static void remove_classes_in_error_state();
 376 
 377   static int calculate_systemdictionary_size(int loadedclasses);
 378 
 379   // Applies "f->do_oop" to all root oops in the system dictionary.
 380   static void oops_do(OopClosure* f);
 381   static void roots_oops_do(OopClosure* strong, OopClosure* weak);
 382 
 383   // System loader lock
 384   static oop system_loader_lock()           { return _system_loader_lock_obj; }
 385 
 386 protected:
 387   // Extended Redefine classes support (tbi)
 388   static void preloaded_classes_do(KlassClosure* f);
 389   static void lazily_loaded_classes_do(KlassClosure* f);
 390 public:
 391   // Sharing support.
 392   static void reorder_dictionary();
 393   static void copy_buckets(char** top, char* end);
 394   static void copy_table(char** top, char* end);
 395   static void reverse();
 396   static void set_shared_dictionary(HashtableBucket<mtClass>* t, int length,
 397                                     int number_of_entries);
 398   // Printing
 399   static void print(bool details = true);
 400   static void print_shared(bool details = true);
 401 
 402   // Number of contained klasses
 403   // This is both fully loaded classes and classes in the process
 404   // of being loaded
 405   static int number_of_classes();
 406 
 407   // Monotonically increasing counter which grows as classes are
 408   // loaded or modifications such as hot-swapping or setting/removing
 409   // of breakpoints are performed




 334   // If both functions return non-null, they must return the same value.
 335   // Also, the unchecked version may sometimes be non-null where the
 336   // checked version is null.  This can occur in several ways:
 337   //   1. No query has yet been made to the class loader.
 338   //   2. The class loader was queried, but chose not to delegate.
 339   //   3. ClassLoader.checkPackageAccess rejected a proposed protection domain.
 340   //   4. Loading was attempted, but there was a linkage error of some sort.
 341   // In all of these cases, the loader constraints on this type are
 342   // satisfied, and it is safe for classes in the given class loader
 343   // to manipulate strongly-typed values of the found class, subject
 344   // to local linkage and access checks.
 345   static Klass* find_constrained_instance_or_array_klass(Symbol* class_name,
 346                                                            Handle class_loader,
 347                                                            TRAPS);
 348 
 349   // Iterate over all klasses in dictionary
 350   // Just the classes from defining class loaders
 351   static void classes_do(void f(Klass*));
 352   // Added for initialize_itable_for_klass to handle exceptions
 353   static void classes_do(void f(Klass*, TRAPS), TRAPS);
 354   // All classes, and their class loaders, including initiating class loaders
 355   static void classes_do(void f(Klass*, ClassLoaderData*));
 356 
 357   // Iterate over all methods in all klasses


 358   static void methods_do(void f(Method*));
 359 
 360   // Garbage collection support
 361 
 362   // This method applies "blk->do_oop" to all the pointers to "system"
 363   // classes and loaders.
 364   static void always_strong_oops_do(OopClosure* blk);
 365   static void always_strong_classes_do(KlassClosure* closure);
 366 
 367   // Unload (that is, break root links to) all unmarked classes and
 368   // loaders.  Returns "true" iff something was unloaded.
 369   static bool do_unloading(BoolObjectClosure* is_alive,
 370                            bool clean_previous_versions = true);
 371 
 372   // Used by DumpSharedSpaces only to remove classes that failed verification
 373   static void remove_classes_in_error_state();
 374 
 375   static int calculate_systemdictionary_size(int loadedclasses);
 376 
 377   // Applies "f->do_oop" to all root oops in the system dictionary.
 378   static void oops_do(OopClosure* f);
 379   static void roots_oops_do(OopClosure* strong, OopClosure* weak);
 380 
 381   // System loader lock
 382   static oop system_loader_lock()           { return _system_loader_lock_obj; }
 383 




 384 public:
 385   // Sharing support.
 386   static void reorder_dictionary();
 387   static void copy_buckets(char** top, char* end);
 388   static void copy_table(char** top, char* end);
 389   static void reverse();
 390   static void set_shared_dictionary(HashtableBucket<mtClass>* t, int length,
 391                                     int number_of_entries);
 392   // Printing
 393   static void print(bool details = true);
 394   static void print_shared(bool details = true);
 395 
 396   // Number of contained klasses
 397   // This is both fully loaded classes and classes in the process
 398   // of being loaded
 399   static int number_of_classes();
 400 
 401   // Monotonically increasing counter which grows as classes are
 402   // loaded or modifications such as hot-swapping or setting/removing
 403   // of breakpoints are performed


< prev index next >