< prev index next >

src/hotspot/share/classfile/classLoaderDataGraph.hpp

Print this page




  52   // during a safepoint after class unloading in a full GC.
  53   static bool _should_clean_deallocate_lists;
  54   static bool _safepoint_cleanup_needed;
  55 
  56   // OOM has been seen in metaspace allocation. Used to prevent some
  57   // allocations until class unloading
  58   static bool _metaspace_oom;
  59 
  60   static volatile size_t  _num_instance_classes;
  61   static volatile size_t  _num_array_classes;
  62 
  63   static ClassLoaderData* add_to_graph(Handle class_loader, bool is_unsafe_anonymous);
  64   static ClassLoaderData* add(Handle class_loader, bool is_unsafe_anonymous);
  65 
  66  public:
  67   static ClassLoaderData* find_or_create(Handle class_loader);
  68   static void clean_module_and_package_info();
  69   static void purge();
  70   static void clear_claimed_marks();
  71   // Iteration through CLDG inside a safepoint; GC support
  72   static void cld_do(CLDClosure* cl);
  73   static void cld_unloading_do(CLDClosure* cl);
  74   static void roots_cld_do(CLDClosure* strong, CLDClosure* weak);



  75   static void always_strong_cld_do(CLDClosure* cl);
  76   // klass do
  77   // Walking classes through the ClassLoaderDataGraph include array classes.  It also includes
  78   // classes that are allocated but not loaded, classes that have errors, and scratch classes
  79   // for redefinition.  These classes are removed during the next class unloading.
  80   // Walking the ClassLoaderDataGraph also includes unsafe anonymous classes.
  81   static void classes_do(KlassClosure* klass_closure);
  82   static void classes_do(void f(Klass* const));
  83   static void methods_do(void f(Method*));
  84   static void modules_do(void f(ModuleEntry*));
  85   static void modules_unloading_do(void f(ModuleEntry*));
  86   static void packages_do(void f(PackageEntry*));
  87   static void packages_unloading_do(void f(PackageEntry*));
  88   static void loaded_classes_do(KlassClosure* klass_closure);
  89   static void unlocked_loaded_classes_do(KlassClosure* klass_closure);
  90   static void classes_unloading_do(void f(Klass* const));
  91   static bool do_unloading(bool do_cleaning);
  92 
  93   // Expose state to avoid logging overhead in safepoint cleanup tasks.
  94   static inline bool should_clean_metaspaces_and_reset();




  52   // during a safepoint after class unloading in a full GC.
  53   static bool _should_clean_deallocate_lists;
  54   static bool _safepoint_cleanup_needed;
  55 
  56   // OOM has been seen in metaspace allocation. Used to prevent some
  57   // allocations until class unloading
  58   static bool _metaspace_oom;
  59 
  60   static volatile size_t  _num_instance_classes;
  61   static volatile size_t  _num_array_classes;
  62 
  63   static ClassLoaderData* add_to_graph(Handle class_loader, bool is_unsafe_anonymous);
  64   static ClassLoaderData* add(Handle class_loader, bool is_unsafe_anonymous);
  65 
  66  public:
  67   static ClassLoaderData* find_or_create(Handle class_loader);
  68   static void clean_module_and_package_info();
  69   static void purge();
  70   static void clear_claimed_marks();
  71   // Iteration through CLDG inside a safepoint; GC support
  72   static void cld_oops_do(CLDClosure* cl);
  73   static void cld_unloading_do(CLDClosure* cl);
  74   static void roots_cld_do(CLDClosure* strong, CLDClosure* weak);
  75   static void always_strong_cld_oops_do(CLDClosure* cl);
  76   // Iteration through CLDG not by GC.
  77   static void cld_do(CLDClosure* cl);
  78   static void always_strong_cld_do(CLDClosure* cl);
  79   // klass do
  80   // Walking classes through the ClassLoaderDataGraph include array classes.  It also includes
  81   // classes that are allocated but not loaded, classes that have errors, and scratch classes
  82   // for redefinition.  These classes are removed during the next class unloading.
  83   // Walking the ClassLoaderDataGraph also includes unsafe anonymous classes.
  84   static void classes_do(KlassClosure* klass_closure);
  85   static void classes_do(void f(Klass* const));
  86   static void methods_do(void f(Method*));
  87   static void modules_do(void f(ModuleEntry*));
  88   static void modules_unloading_do(void f(ModuleEntry*));
  89   static void packages_do(void f(PackageEntry*));
  90   static void packages_unloading_do(void f(PackageEntry*));
  91   static void loaded_classes_do(KlassClosure* klass_closure);
  92   static void unlocked_loaded_classes_do(KlassClosure* klass_closure);
  93   static void classes_unloading_do(void f(Klass* const));
  94   static bool do_unloading(bool do_cleaning);
  95 
  96   // Expose state to avoid logging overhead in safepoint cleanup tasks.
  97   static inline bool should_clean_metaspaces_and_reset();


< prev index next >