< prev index next >

src/share/vm/gc/parallel/psScavenge.inline.hpp

Print this page




 123 
 124  private:
 125   void do_klass_barrier() {
 126     assert(_scanned_klass != NULL, "Should not be called without having a scanned klass");
 127     _scanned_klass->record_modified_oops();
 128   }
 129 
 130 };
 131 
 132 // Scavenges the oop in a Klass.
 133 class PSScavengeKlassClosure: public KlassClosure {
 134  private:
 135   PSScavengeFromKlassClosure _oop_closure;
 136  protected:
 137  public:
 138   PSScavengeKlassClosure(PSPromotionManager* pm) : _oop_closure(pm) { }
 139   void do_klass(Klass* klass) {
 140     // If the klass has not been dirtied we know that there's
 141     // no references into  the young gen and we can skip it.
 142 
 143     NOT_PRODUCT(ResourceMark rm);
 144     log_develop_trace(gc, scavenge)("PSScavengeKlassClosure::do_klass " PTR_FORMAT ", %s, dirty: %s",
 145                                     p2i(klass),
 146                                     klass->external_name(),
 147                                     klass->has_modified_oops() ? "true" : "false");
 148 
 149     if (klass->has_modified_oops()) {
 150       // Clean the klass since we're going to scavenge all the metadata.
 151       klass->clear_modified_oops();
 152 
 153       // Setup the promotion manager to redirty this klass
 154       // if references are left in the young gen.
 155       _oop_closure.set_scanned_klass(klass);
 156 
 157       klass->oops_do(&_oop_closure);
 158 
 159       _oop_closure.set_scanned_klass(NULL);
 160     }
 161   }
 162 };
 163 
 164 #endif // SHARE_VM_GC_PARALLEL_PSSCAVENGE_INLINE_HPP


 123 
 124  private:
 125   void do_klass_barrier() {
 126     assert(_scanned_klass != NULL, "Should not be called without having a scanned klass");
 127     _scanned_klass->record_modified_oops();
 128   }
 129 
 130 };
 131 
 132 // Scavenges the oop in a Klass.
 133 class PSScavengeKlassClosure: public KlassClosure {
 134  private:
 135   PSScavengeFromKlassClosure _oop_closure;
 136  protected:
 137  public:
 138   PSScavengeKlassClosure(PSPromotionManager* pm) : _oop_closure(pm) { }
 139   void do_klass(Klass* klass) {
 140     // If the klass has not been dirtied we know that there's
 141     // no references into  the young gen and we can skip it.
 142 






 143     if (klass->has_modified_oops()) {
 144       // Clean the klass since we're going to scavenge all the metadata.
 145       klass->clear_modified_oops();
 146 
 147       // Setup the promotion manager to redirty this klass
 148       // if references are left in the young gen.
 149       _oop_closure.set_scanned_klass(klass);
 150 
 151       klass->oops_do(&_oop_closure);
 152 
 153       _oop_closure.set_scanned_klass(NULL);
 154     }
 155   }
 156 };
 157 
 158 #endif // SHARE_VM_GC_PARALLEL_PSSCAVENGE_INLINE_HPP
< prev index next >