< prev index next >

src/hotspot/share/classfile/classLoaderDataGraph.hpp

Print this page




  24 
  25 #ifndef SHARE_CLASSFILE_CLASSLOADERDATAGRAPH_HPP
  26 #define SHARE_CLASSFILE_CLASSLOADERDATAGRAPH_HPP
  27 
  28 #include "classfile/classLoaderData.hpp"
  29 #include "memory/allocation.hpp"
  30 #include "utilities/growableArray.hpp"
  31 #include "utilities/macros.hpp"
  32 
  33 // GC root for walking class loader data created
  34 
  35 class ClassLoaderDataGraph : public AllStatic {
  36   friend class ClassLoaderData;
  37   friend class ClassLoaderDataGraphMetaspaceIterator;
  38   friend class ClassLoaderDataGraphKlassIteratorAtomic;
  39   friend class ClassLoaderDataGraphKlassIteratorStatic;
  40   friend class ClassLoaderDataGraphIterator;
  41   friend class VMStructs;
  42  private:
  43   // All CLDs (except the null CLD) can be reached by walking _head->_next->...
  44   static ClassLoaderData* volatile _head;
  45   static ClassLoaderData* _unloading;
  46   // CMS support.
  47   static ClassLoaderData* _saved_head;
  48   static ClassLoaderData* _saved_unloading;
  49   static bool _should_purge;
  50 
  51   // Set if there's anything to purge in the deallocate lists or previous versions
  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);




  24 
  25 #ifndef SHARE_CLASSFILE_CLASSLOADERDATAGRAPH_HPP
  26 #define SHARE_CLASSFILE_CLASSLOADERDATAGRAPH_HPP
  27 
  28 #include "classfile/classLoaderData.hpp"
  29 #include "memory/allocation.hpp"
  30 #include "utilities/growableArray.hpp"
  31 #include "utilities/macros.hpp"
  32 
  33 // GC root for walking class loader data created
  34 
  35 class ClassLoaderDataGraph : public AllStatic {
  36   friend class ClassLoaderData;
  37   friend class ClassLoaderDataGraphMetaspaceIterator;
  38   friend class ClassLoaderDataGraphKlassIteratorAtomic;
  39   friend class ClassLoaderDataGraphKlassIteratorStatic;
  40   friend class ClassLoaderDataGraphIterator;
  41   friend class VMStructs;
  42  private:
  43   // All CLDs (except the null CLD) can be reached by walking _head->_next->...
  44   static ClassLoaderData* _head;
  45   static ClassLoaderData* _unloading;
  46   // CMS support.
  47   static ClassLoaderData* _saved_head;
  48   static ClassLoaderData* _saved_unloading;
  49   static bool _should_purge;
  50 
  51   // Set if there's anything to purge in the deallocate lists or previous versions
  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);


< prev index next >