< prev index next >

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

Print this page
rev 49678 : imported patch 8200426-sangheon-review
rev 49680 : imported patch 6672778-partial-queue-trimming
rev 49681 : imported patch 6672778-refactoring
rev 49682 : [mq]: 6672778-stefanj-review


3109       _n_workers(n_workers)
3110   {}
3111 
3112   void work(uint worker_id) {
3113     if (worker_id >= _n_workers) return;  // no work needed this round
3114 
3115     double start_sec = os::elapsedTime();
3116     _g1h->g1_policy()->phase_times()->record_time_secs(G1GCPhaseTimes::GCWorkerStart, worker_id, start_sec);
3117 
3118     {
3119       ResourceMark rm;
3120       HandleMark   hm;
3121 
3122       ReferenceProcessor*             rp = _g1h->ref_processor_stw();
3123 
3124       G1ParScanThreadState*           pss = _pss->state_for_worker(worker_id);
3125       pss->set_ref_processor(rp);
3126 
3127       double start_strong_roots_sec = os::elapsedTime();
3128 
3129       _root_processor->evacuate_roots(pss, pss->closures(), worker_id);
3130 
3131       // We pass a weak code blobs closure to the remembered set scanning because we want to avoid
3132       // treating the nmethods visited to act as roots for concurrent marking.
3133       // We only want to make sure that the oops in the nmethods are adjusted with regard to the
3134       // objects copied by the current evacuation.
3135       _g1h->g1_rem_set()->oops_into_collection_set_do(pss, worker_id);
3136 
3137       double strong_roots_sec = os::elapsedTime() - start_strong_roots_sec;
3138 
3139       double term_sec = 0.0;
3140       size_t evac_term_attempts = 0;
3141       {
3142         double start = os::elapsedTime();
3143         G1ParEvacuateFollowersClosure evac(_g1h, pss, _queues, &_terminator);
3144         evac.do_void();
3145 
3146         evac_term_attempts = evac.term_attempts();
3147         term_sec = evac.term_time();
3148         double elapsed_sec = os::elapsedTime() - start;
3149 




3109       _n_workers(n_workers)
3110   {}
3111 
3112   void work(uint worker_id) {
3113     if (worker_id >= _n_workers) return;  // no work needed this round
3114 
3115     double start_sec = os::elapsedTime();
3116     _g1h->g1_policy()->phase_times()->record_time_secs(G1GCPhaseTimes::GCWorkerStart, worker_id, start_sec);
3117 
3118     {
3119       ResourceMark rm;
3120       HandleMark   hm;
3121 
3122       ReferenceProcessor*             rp = _g1h->ref_processor_stw();
3123 
3124       G1ParScanThreadState*           pss = _pss->state_for_worker(worker_id);
3125       pss->set_ref_processor(rp);
3126 
3127       double start_strong_roots_sec = os::elapsedTime();
3128 
3129       _root_processor->evacuate_roots(pss, worker_id);
3130 
3131       // We pass a weak code blobs closure to the remembered set scanning because we want to avoid
3132       // treating the nmethods visited to act as roots for concurrent marking.
3133       // We only want to make sure that the oops in the nmethods are adjusted with regard to the
3134       // objects copied by the current evacuation.
3135       _g1h->g1_rem_set()->oops_into_collection_set_do(pss, worker_id);
3136 
3137       double strong_roots_sec = os::elapsedTime() - start_strong_roots_sec;
3138 
3139       double term_sec = 0.0;
3140       size_t evac_term_attempts = 0;
3141       {
3142         double start = os::elapsedTime();
3143         G1ParEvacuateFollowersClosure evac(_g1h, pss, _queues, &_terminator);
3144         evac.do_void();
3145 
3146         evac_term_attempts = evac.term_attempts();
3147         term_sec = evac.term_time();
3148         double elapsed_sec = os::elapsedTime() - start;
3149 


< prev index next >