< prev index next >

src/share/vm/gc/g1/g1MarkSweep.cpp

Print this page
rev 8463 : Support for -Xnoclassgc


 134   }
 135 
 136   // Process reference objects found during marking
 137   ReferenceProcessor* rp = GenMarkSweep::ref_processor();
 138   assert(rp == g1h->ref_processor_stw(), "Sanity");
 139 
 140   rp->setup_policy(clear_all_softrefs);
 141   const ReferenceProcessorStats& stats =
 142     rp->process_discovered_references(&GenMarkSweep::is_alive,
 143                                       &GenMarkSweep::keep_alive,
 144                                       &GenMarkSweep::follow_stack_closure,
 145                                       NULL,
 146                                       gc_timer(),
 147                                       gc_tracer()->gc_id());
 148   gc_tracer()->report_gc_reference_stats(stats);
 149 
 150 
 151   // This is the point where the entire marking should have completed.
 152   assert(GenMarkSweep::_marking_stack.is_empty(), "Marking should have completed");
 153 

 154   // Unload classes and purge the SystemDictionary.
 155   bool purged_class = SystemDictionary::do_unloading(&GenMarkSweep::is_alive);
 156 
 157   // Unload nmethods.
 158   CodeCache::do_unloading(&GenMarkSweep::is_alive, purged_class);
 159 
 160   // Prune dead klasses from subklass/sibling/implementor lists.
 161   Klass::clean_weak_klass_links(&GenMarkSweep::is_alive);

 162 
 163   // Delete entries for dead interned string and clean up unreferenced symbols in symbol table.
 164   g1h->unlink_string_and_symbol_table(&GenMarkSweep::is_alive);
 165 
 166   if (VerifyDuringGC) {
 167     HandleMark hm;  // handle scope
 168     COMPILER2_PRESENT(DerivedPointerTableDeactivate dpt_deact);
 169     g1h->prepare_for_verify();
 170     // Note: we can verify only the heap here. When an object is
 171     // marked, the previous value of the mark word (including
 172     // identity hash values, ages, etc) is preserved, and the mark
 173     // word is set to markOop::marked_value - effectively removing
 174     // any hash values from the mark word. These hash values are
 175     // used when verifying the dictionaries and so removing them
 176     // from the mark word can make verification of the dictionaries
 177     // fail. At the end of the GC, the original mark word values
 178     // (including hash values) are restored to the appropriate
 179     // objects.
 180     if (!VerifySilently) {
 181       gclog_or_tty->print(" VerifyDuringGC:(full)[Verifying ");




 134   }
 135 
 136   // Process reference objects found during marking
 137   ReferenceProcessor* rp = GenMarkSweep::ref_processor();
 138   assert(rp == g1h->ref_processor_stw(), "Sanity");
 139 
 140   rp->setup_policy(clear_all_softrefs);
 141   const ReferenceProcessorStats& stats =
 142     rp->process_discovered_references(&GenMarkSweep::is_alive,
 143                                       &GenMarkSweep::keep_alive,
 144                                       &GenMarkSweep::follow_stack_closure,
 145                                       NULL,
 146                                       gc_timer(),
 147                                       gc_tracer()->gc_id());
 148   gc_tracer()->report_gc_reference_stats(stats);
 149 
 150 
 151   // This is the point where the entire marking should have completed.
 152   assert(GenMarkSweep::_marking_stack.is_empty(), "Marking should have completed");
 153 
 154   if (ClassUnloading) {
 155     // Unload classes and purge the SystemDictionary.
 156     bool purged_class = SystemDictionary::do_unloading(&GenMarkSweep::is_alive);
 157 
 158     // Unload nmethods.
 159     CodeCache::do_unloading(&GenMarkSweep::is_alive, purged_class);
 160 
 161     // Prune dead klasses from subklass/sibling/implementor lists.
 162     Klass::clean_weak_klass_links(&GenMarkSweep::is_alive);
 163   }
 164 
 165   // Delete entries for dead interned string and clean up unreferenced symbols in symbol table.
 166   g1h->unlink_string_and_symbol_table(&GenMarkSweep::is_alive);
 167 
 168   if (VerifyDuringGC) {
 169     HandleMark hm;  // handle scope
 170     COMPILER2_PRESENT(DerivedPointerTableDeactivate dpt_deact);
 171     g1h->prepare_for_verify();
 172     // Note: we can verify only the heap here. When an object is
 173     // marked, the previous value of the mark word (including
 174     // identity hash values, ages, etc) is preserved, and the mark
 175     // word is set to markOop::marked_value - effectively removing
 176     // any hash values from the mark word. These hash values are
 177     // used when verifying the dictionaries and so removing them
 178     // from the mark word can make verification of the dictionaries
 179     // fail. At the end of the GC, the original mark word values
 180     // (including hash values) are restored to the appropriate
 181     // objects.
 182     if (!VerifySilently) {
 183       gclog_or_tty->print(" VerifyDuringGC:(full)[Verifying ");


< prev index next >