hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
changeset 30556 750fee2bdb45
parent 30555 3b3701596be8
equal deleted inserted replaced
30555:3b3701596be8 30556:750fee2bdb45
   820 bool PSParallelCompact::IsAliveClosure::do_object_b(oop p) { return mark_bitmap()->is_marked(p); }
   820 bool PSParallelCompact::IsAliveClosure::do_object_b(oop p) { return mark_bitmap()->is_marked(p); }
   821 
   821 
   822 PSParallelCompact::AdjustPointerClosure PSParallelCompact::_adjust_pointer_closure;
   822 PSParallelCompact::AdjustPointerClosure PSParallelCompact::_adjust_pointer_closure;
   823 PSParallelCompact::AdjustKlassClosure PSParallelCompact::_adjust_klass_closure;
   823 PSParallelCompact::AdjustKlassClosure PSParallelCompact::_adjust_klass_closure;
   824 
   824 
   825 void PSParallelCompact::FollowStackClosure::do_void() { _compaction_manager->follow_marking_stacks(); }
       
   826 
       
   827 void PSParallelCompact::FollowKlassClosure::do_klass(Klass* klass) {
       
   828   klass->oops_do(_mark_and_push_closure);
       
   829 }
       
   830 void PSParallelCompact::AdjustKlassClosure::do_klass(Klass* klass) {
   825 void PSParallelCompact::AdjustKlassClosure::do_klass(Klass* klass) {
   831   klass->oops_do(&PSParallelCompact::_adjust_pointer_closure);
   826   klass->oops_do(&PSParallelCompact::_adjust_pointer_closure);
   832 }
   827 }
   833 
   828 
   834 void PSParallelCompact::post_initialize() {
   829 void PSParallelCompact::post_initialize() {
  2344   uint parallel_gc_threads = heap->gc_task_manager()->workers();
  2339   uint parallel_gc_threads = heap->gc_task_manager()->workers();
  2345   uint active_gc_threads = heap->gc_task_manager()->active_workers();
  2340   uint active_gc_threads = heap->gc_task_manager()->active_workers();
  2346   TaskQueueSetSuper* qset = ParCompactionManager::region_array();
  2341   TaskQueueSetSuper* qset = ParCompactionManager::region_array();
  2347   ParallelTaskTerminator terminator(active_gc_threads, qset);
  2342   ParallelTaskTerminator terminator(active_gc_threads, qset);
  2348 
  2343 
  2349   PSParallelCompact::MarkAndPushClosure mark_and_push_closure(cm);
  2344   ParCompactionManager::MarkAndPushClosure mark_and_push_closure(cm);
  2350   PSParallelCompact::FollowStackClosure follow_stack_closure(cm);
  2345   ParCompactionManager::FollowStackClosure follow_stack_closure(cm);
  2351 
  2346 
  2352   // Need new claim bits before marking starts.
  2347   // Need new claim bits before marking starts.
  2353   ClassLoaderDataGraph::clear_claimed_marks();
  2348   ClassLoaderDataGraph::clear_claimed_marks();
  2354 
  2349 
  2355   {
  2350   {
  2417   StringTable::unlink(is_alive_closure());
  2412   StringTable::unlink(is_alive_closure());
  2418 
  2413 
  2419   // Clean up unreferenced symbols in symbol table.
  2414   // Clean up unreferenced symbols in symbol table.
  2420   SymbolTable::unlink();
  2415   SymbolTable::unlink();
  2421   _gc_tracer.report_object_count_after_gc(is_alive_closure());
  2416   _gc_tracer.report_object_count_after_gc(is_alive_closure());
  2422 }
       
  2423 
       
  2424 void PSParallelCompact::follow_class_loader(ParCompactionManager* cm,
       
  2425                                             ClassLoaderData* cld) {
       
  2426   PSParallelCompact::MarkAndPushClosure mark_and_push_closure(cm);
       
  2427   PSParallelCompact::FollowKlassClosure follow_klass_closure(&mark_and_push_closure);
       
  2428 
       
  2429   cld->oops_do(&mark_and_push_closure, &follow_klass_closure, true);
       
  2430 }
  2417 }
  2431 
  2418 
  2432 // This should be moved to the shared markSweep code!
  2419 // This should be moved to the shared markSweep code!
  2433 class PSAlwaysTrueClosure: public BoolObjectClosure {
  2420 class PSAlwaysTrueClosure: public BoolObjectClosure {
  2434 public:
  2421 public: