< prev index next >

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

Print this page




4078 
4079     // Clean all klasses that were not unloaded.
4080     _klass_cleaning_task.work();
4081   }
4082 };
4083 
4084 
4085 void G1CollectedHeap::parallel_cleaning(BoolObjectClosure* is_alive,
4086                                         bool process_strings,
4087                                         bool process_symbols,
4088                                         bool class_unloading_occurred) {
4089   uint n_workers = workers()->active_workers();
4090 
4091   G1ParallelCleaningTask g1_unlink_task(is_alive, process_strings, process_symbols,
4092                                         n_workers, class_unloading_occurred);
4093   workers()->run_task(&g1_unlink_task);
4094 }
4095 
4096 void G1CollectedHeap::unlink_string_and_symbol_table(BoolObjectClosure* is_alive,
4097                                                      bool process_strings, bool process_symbols) {
4098   {
4099     G1StringSymbolTableUnlinkTask g1_unlink_task(is_alive, process_strings, process_symbols);
4100     workers()->run_task(&g1_unlink_task);
4101   }
4102 
4103   if (G1StringDedup::is_enabled()) {
4104     G1StringDedup::unlink(is_alive);
4105   }
4106 }
4107 
4108 class G1RedirtyLoggedCardsTask : public AbstractGangTask {
4109  private:
4110   DirtyCardQueueSet* _queue;
4111   G1CollectedHeap* _g1h;
4112  public:
4113   G1RedirtyLoggedCardsTask(DirtyCardQueueSet* queue, G1CollectedHeap* g1h) : AbstractGangTask("Redirty Cards"),
4114     _queue(queue), _g1h(g1h) { }
4115 
4116   virtual void work(uint worker_id) {
4117     G1GCPhaseTimes* phase_times = _g1h->g1_policy()->phase_times();
4118     G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::RedirtyCards, worker_id);
4119 
4120     RedirtyLoggedCardTableEntryClosure cl(_g1h);
4121     _queue->par_apply_closure_to_all_completed_buffers(&cl);
4122 
4123     phase_times->record_thread_work_item(G1GCPhaseTimes::RedirtyCards, worker_id, cl.num_dirtied());
4124   }




4078 
4079     // Clean all klasses that were not unloaded.
4080     _klass_cleaning_task.work();
4081   }
4082 };
4083 
4084 
4085 void G1CollectedHeap::parallel_cleaning(BoolObjectClosure* is_alive,
4086                                         bool process_strings,
4087                                         bool process_symbols,
4088                                         bool class_unloading_occurred) {
4089   uint n_workers = workers()->active_workers();
4090 
4091   G1ParallelCleaningTask g1_unlink_task(is_alive, process_strings, process_symbols,
4092                                         n_workers, class_unloading_occurred);
4093   workers()->run_task(&g1_unlink_task);
4094 }
4095 
4096 void G1CollectedHeap::unlink_string_and_symbol_table(BoolObjectClosure* is_alive,
4097                                                      bool process_strings, bool process_symbols) {
4098   { // Timing scope
4099     G1StringSymbolTableUnlinkTask g1_unlink_task(is_alive, process_strings, process_symbols);
4100     workers()->run_task(&g1_unlink_task);




4101   }
4102 }
4103 
4104 class G1RedirtyLoggedCardsTask : public AbstractGangTask {
4105  private:
4106   DirtyCardQueueSet* _queue;
4107   G1CollectedHeap* _g1h;
4108  public:
4109   G1RedirtyLoggedCardsTask(DirtyCardQueueSet* queue, G1CollectedHeap* g1h) : AbstractGangTask("Redirty Cards"),
4110     _queue(queue), _g1h(g1h) { }
4111 
4112   virtual void work(uint worker_id) {
4113     G1GCPhaseTimes* phase_times = _g1h->g1_policy()->phase_times();
4114     G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::RedirtyCards, worker_id);
4115 
4116     RedirtyLoggedCardTableEntryClosure cl(_g1h);
4117     _queue->par_apply_closure_to_all_completed_buffers(&cl);
4118 
4119     phase_times->record_thread_work_item(G1GCPhaseTimes::RedirtyCards, worker_id, cl.num_dirtied());
4120   }


< prev index next >