< prev index next >

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

Print this page
rev 50505 : imported patch 8204613-stringtable-unclean-fix


2758 
2759 CMSPhaseAccounting::~CMSPhaseAccounting() {
2760   _collector->gc_timer_cm()->register_gc_concurrent_end();
2761   _collector->stopTimer();
2762   log_debug(gc)("Concurrent active time: %.3fms", TimeHelper::counter_to_seconds(_collector->timerTicks()));
2763   log_trace(gc)(" (CMS %s yielded %d times)", _title, _collector->yields());
2764 }
2765 
2766 // CMS work
2767 
2768 // The common parts of CMSParInitialMarkTask and CMSParRemarkTask.
2769 class CMSParMarkTask : public AbstractGangTask {
2770  protected:
2771   CMSCollector*     _collector;
2772   uint              _n_workers;
2773   OopStorage::ParState<false, false> _par_state_string;
2774   CMSParMarkTask(const char* name, CMSCollector* collector, uint n_workers) :
2775       AbstractGangTask(name),
2776       _collector(collector),
2777       _n_workers(n_workers),
2778       _par_state_string(StringTable::weak_storage()) {}





2779   // Work method in support of parallel rescan ... of young gen spaces
2780   void do_young_space_rescan(OopsInGenClosure* cl,
2781                              ContiguousSpace* space,
2782                              HeapWord** chunk_array, size_t chunk_top);
2783   void work_on_young_gen_roots(OopsInGenClosure* cl);
2784 };
2785 
2786 // Parallel initial mark task
2787 class CMSParInitialMarkTask: public CMSParMarkTask {
2788   StrongRootsScope* _strong_roots_scope;
2789  public:
2790   CMSParInitialMarkTask(CMSCollector* collector, StrongRootsScope* strong_roots_scope, uint n_workers) :
2791       CMSParMarkTask("Scan roots and young gen for initial mark in parallel", collector, n_workers),
2792       _strong_roots_scope(strong_roots_scope) {}
2793   void work(uint worker_id);
2794 };
2795 
2796 // Checkpoint the roots into this generation from outside
2797 // this generation. [Note this initial checkpoint need only
2798 // be approximate -- we'll do a catch up phase subsequently.]




2758 
2759 CMSPhaseAccounting::~CMSPhaseAccounting() {
2760   _collector->gc_timer_cm()->register_gc_concurrent_end();
2761   _collector->stopTimer();
2762   log_debug(gc)("Concurrent active time: %.3fms", TimeHelper::counter_to_seconds(_collector->timerTicks()));
2763   log_trace(gc)(" (CMS %s yielded %d times)", _title, _collector->yields());
2764 }
2765 
2766 // CMS work
2767 
2768 // The common parts of CMSParInitialMarkTask and CMSParRemarkTask.
2769 class CMSParMarkTask : public AbstractGangTask {
2770  protected:
2771   CMSCollector*     _collector;
2772   uint              _n_workers;
2773   OopStorage::ParState<false, false> _par_state_string;
2774   CMSParMarkTask(const char* name, CMSCollector* collector, uint n_workers) :
2775       AbstractGangTask(name),
2776       _collector(collector),
2777       _n_workers(n_workers),
2778       _par_state_string(StringTable::weak_storage()) {
2779     StringTable::reset_dead_counter();
2780   }
2781   ~CMSParMarkTask() {
2782     StringTable::finish_dead_counter();
2783   }
2784   // Work method in support of parallel rescan ... of young gen spaces
2785   void do_young_space_rescan(OopsInGenClosure* cl,
2786                              ContiguousSpace* space,
2787                              HeapWord** chunk_array, size_t chunk_top);
2788   void work_on_young_gen_roots(OopsInGenClosure* cl);
2789 };
2790 
2791 // Parallel initial mark task
2792 class CMSParInitialMarkTask: public CMSParMarkTask {
2793   StrongRootsScope* _strong_roots_scope;
2794  public:
2795   CMSParInitialMarkTask(CMSCollector* collector, StrongRootsScope* strong_roots_scope, uint n_workers) :
2796       CMSParMarkTask("Scan roots and young gen for initial mark in parallel", collector, n_workers),
2797       _strong_roots_scope(strong_roots_scope) {}
2798   void work(uint worker_id);
2799 };
2800 
2801 // Checkpoint the roots into this generation from outside
2802 // this generation. [Note this initial checkpoint need only
2803 // be approximate -- we'll do a catch up phase subsequently.]


< prev index next >