Print this page
rev 6875 : 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
Reviewed-by: mgerdin, coleenp, bdelsart

Split Split Close
Expand all
Collapse all
          --- old/src/share/vm/classfile/classLoaderData.hpp
          +++ new/src/share/vm/classfile/classLoaderData.hpp
↓ open down ↓ 63 lines elided ↑ open up ↑
  64   64    // All CLDs (except the null CLD) can be reached by walking _head->_next->...
  65   65    static ClassLoaderData* _head;
  66   66    static ClassLoaderData* _unloading;
  67   67    // CMS support.
  68   68    static ClassLoaderData* _saved_head;
  69   69    static ClassLoaderData* _saved_unloading;
  70   70    static bool _should_purge;
  71   71  
  72   72    static ClassLoaderData* add(Handle class_loader, bool anonymous, TRAPS);
  73   73    static void post_class_unload_events(void);
       74 +  static void clean_metaspaces();
  74   75   public:
  75   76    static ClassLoaderData* find_or_create(Handle class_loader, TRAPS);
  76   77    static void purge();
  77   78    static void clear_claimed_marks();
  78   79    // oops do
  79   80    static void oops_do(OopClosure* f, KlassClosure* klass_closure, bool must_claim);
  80   81    static void keep_alive_oops_do(OopClosure* blk, KlassClosure* klass_closure, bool must_claim);
  81   82    static void always_strong_oops_do(OopClosure* blk, KlassClosure* klass_closure, bool must_claim);
  82   83    // cld do
  83   84    static void cld_do(CLDClosure* cl);
  84   85    static void roots_cld_do(CLDClosure* strong, CLDClosure* weak);
  85   86    static void keep_alive_cld_do(CLDClosure* cl);
  86   87    static void always_strong_cld_do(CLDClosure* cl);
  87   88    // klass do
  88   89    static void classes_do(KlassClosure* klass_closure);
  89   90    static void classes_do(void f(Klass* const));
  90   91    static void loaded_classes_do(KlassClosure* klass_closure);
  91   92    static void classes_unloading_do(void f(Klass* const));
  92      -  static bool do_unloading(BoolObjectClosure* is_alive);
       93 +  static bool do_unloading(BoolObjectClosure* is_alive, bool clean_alive);
  93   94  
  94   95    // CMS support.
  95   96    static void remember_new_clds(bool remember) { _saved_head = (remember ? _head : NULL); }
  96   97    static GrowableArray<ClassLoaderData*>* new_clds();
  97   98  
  98   99    static void set_should_purge(bool b) { _should_purge = b; }
  99  100    static void purge_if_needed() {
 100  101      // Only purge the CLDG for CMS if concurrent sweep is complete.
 101  102      if (_should_purge) {
 102  103        purge();
 103  104        // reset for next time.
 104  105        set_should_purge(false);
 105  106      }
 106  107    }
 107  108  
      109 +  static void free_deallocate_lists();
      110 +
 108  111    static void dump_on(outputStream * const out) PRODUCT_RETURN;
 109  112    static void dump() { dump_on(tty); }
 110  113    static void verify();
 111  114  
 112  115    static bool unload_list_contains(const void* x);
 113  116  #ifndef PRODUCT
 114  117    static bool contains_loader_data(ClassLoaderData* loader_data);
 115  118  #endif
 116  119  
 117  120  #if INCLUDE_TRACE
↓ open down ↓ 214 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX