< prev index next >

src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp

Print this page




5245       GCTraceTime(Debug, gc, phases) t("Scrub Symbol Table", _gc_timer_cm);
5246       // Clean up unreferenced symbols in symbol table.
5247       SymbolTable::unlink();
5248     }
5249 
5250     {
5251       GCTraceTime(Debug, gc, phases) t("Scrub String Table", _gc_timer_cm);
5252       // Delete entries for dead interned strings.
5253       StringTable::unlink(&_is_alive_closure);
5254     }
5255   }
5256 
5257   // Restore any preserved marks as a result of mark stack or
5258   // work queue overflow
5259   restore_preserved_marks_if_any();  // done single-threaded for now
5260 
5261   rp->set_enqueuing_is_done(true);
5262   if (rp->processing_is_mt()) {
5263     rp->balance_all_queues();
5264     CMSRefProcTaskExecutor task_executor(*this);
5265     rp->enqueue_discovered_references(&task_executor);
5266   } else {
5267     rp->enqueue_discovered_references(NULL);
5268   }
5269   rp->verify_no_references_recorded();
5270   assert(!rp->discovery_enabled(), "should have been disabled");
5271 }
5272 
5273 #ifndef PRODUCT
5274 void CMSCollector::check_correct_thread_executing() {
5275   Thread* t = Thread::current();
5276   // Only the VM thread or the CMS thread should be here.
5277   assert(t->is_ConcurrentGC_thread() || t->is_VM_thread(),
5278          "Unexpected thread type");
5279   // If this is the vm thread, the foreground process
5280   // should not be waiting.  Note that _foregroundGCIsActive is
5281   // true while the foreground collector is waiting.
5282   if (_foregroundGCShouldWait) {
5283     // We cannot be the VM thread
5284     assert(t->is_ConcurrentGC_thread(),
5285            "Should be CMS thread");




5245       GCTraceTime(Debug, gc, phases) t("Scrub Symbol Table", _gc_timer_cm);
5246       // Clean up unreferenced symbols in symbol table.
5247       SymbolTable::unlink();
5248     }
5249 
5250     {
5251       GCTraceTime(Debug, gc, phases) t("Scrub String Table", _gc_timer_cm);
5252       // Delete entries for dead interned strings.
5253       StringTable::unlink(&_is_alive_closure);
5254     }
5255   }
5256 
5257   // Restore any preserved marks as a result of mark stack or
5258   // work queue overflow
5259   restore_preserved_marks_if_any();  // done single-threaded for now
5260 
5261   rp->set_enqueuing_is_done(true);
5262   if (rp->processing_is_mt()) {
5263     rp->balance_all_queues();
5264     CMSRefProcTaskExecutor task_executor(*this);
5265     rp->enqueue_discovered_references(&task_executor, _gc_timer_cm);
5266   } else {
5267     rp->enqueue_discovered_references(NULL);
5268   }
5269   rp->verify_no_references_recorded();
5270   assert(!rp->discovery_enabled(), "should have been disabled");
5271 }
5272 
5273 #ifndef PRODUCT
5274 void CMSCollector::check_correct_thread_executing() {
5275   Thread* t = Thread::current();
5276   // Only the VM thread or the CMS thread should be here.
5277   assert(t->is_ConcurrentGC_thread() || t->is_VM_thread(),
5278          "Unexpected thread type");
5279   // If this is the vm thread, the foreground process
5280   // should not be waiting.  Note that _foregroundGCIsActive is
5281   // true while the foreground collector is waiting.
5282   if (_foregroundGCShouldWait) {
5283     // We cannot be the VM thread
5284     assert(t->is_ConcurrentGC_thread(),
5285            "Should be CMS thread");


< prev index next >