3283 _root_processor->evacuate_roots(pss, worker_id); 3284 3285 _g1h->g1_rem_set()->oops_into_collection_set_do(pss, worker_id); 3286 3287 double strong_roots_sec = os::elapsedTime() - start_strong_roots_sec; 3288 3289 double term_sec = 0.0; 3290 size_t evac_term_attempts = 0; 3291 { 3292 double start = os::elapsedTime(); 3293 G1ParEvacuateFollowersClosure evac(_g1h, pss, _queues, _terminator.terminator(), G1GCPhaseTimes::ObjCopy); 3294 evac.do_void(); 3295 3296 evac_term_attempts = evac.term_attempts(); 3297 term_sec = evac.term_time(); 3298 double elapsed_sec = os::elapsedTime() - start; 3299 3300 G1GCPhaseTimes* p = _g1h->g1_policy()->phase_times(); 3301 p->add_time_secs(G1GCPhaseTimes::ObjCopy, worker_id, elapsed_sec - term_sec); 3302 3303 p->record_or_add_thread_work_item(G1GCPhaseTimes::ObjCopy, worker_id, pss->lab_waste(), G1GCPhaseTimes::ObjCopyLABWaste); 3304 p->record_or_add_thread_work_item(G1GCPhaseTimes::ObjCopy, worker_id, pss->lab_undo_waste(), G1GCPhaseTimes::ObjCopyLABUndoWaste); 3305 3306 p->record_time_secs(G1GCPhaseTimes::Termination, worker_id, term_sec); 3307 p->record_thread_work_item(G1GCPhaseTimes::Termination, worker_id, evac_term_attempts); 3308 } 3309 3310 assert(pss->queue_is_empty(), "should be empty"); 3311 3312 // Close the inner scope so that the ResourceMark and HandleMark 3313 // destructors are executed here and are included as part of the 3314 // "GC Worker Time". 3315 } 3316 _g1h->g1_policy()->phase_times()->record_time_secs(G1GCPhaseTimes::GCWorkerEnd, worker_id, os::elapsedTime()); 3317 } 3318 }; 3319 3320 void G1CollectedHeap::complete_cleaning(BoolObjectClosure* is_alive, 3321 bool class_unloading_occurred) { 3322 uint num_workers = workers()->active_workers(); 3323 ParallelCleaningTask unlink_task(is_alive, num_workers, class_unloading_occurred, false); 3324 workers()->run_task(&unlink_task); | 3283 _root_processor->evacuate_roots(pss, worker_id); 3284 3285 _g1h->g1_rem_set()->oops_into_collection_set_do(pss, worker_id); 3286 3287 double strong_roots_sec = os::elapsedTime() - start_strong_roots_sec; 3288 3289 double term_sec = 0.0; 3290 size_t evac_term_attempts = 0; 3291 { 3292 double start = os::elapsedTime(); 3293 G1ParEvacuateFollowersClosure evac(_g1h, pss, _queues, _terminator.terminator(), G1GCPhaseTimes::ObjCopy); 3294 evac.do_void(); 3295 3296 evac_term_attempts = evac.term_attempts(); 3297 term_sec = evac.term_time(); 3298 double elapsed_sec = os::elapsedTime() - start; 3299 3300 G1GCPhaseTimes* p = _g1h->g1_policy()->phase_times(); 3301 p->add_time_secs(G1GCPhaseTimes::ObjCopy, worker_id, elapsed_sec - term_sec); 3302 3303 p->record_or_add_thread_work_item(G1GCPhaseTimes::ObjCopy, 3304 worker_id, 3305 pss->lab_waste_words() * HeapWordSize, 3306 G1GCPhaseTimes::ObjCopyLABWaste); 3307 p->record_or_add_thread_work_item(G1GCPhaseTimes::ObjCopy, 3308 worker_id, 3309 pss->lab_undo_waste_words() * HeapWordSize, 3310 G1GCPhaseTimes::ObjCopyLABUndoWaste); 3311 3312 p->record_time_secs(G1GCPhaseTimes::Termination, worker_id, term_sec); 3313 p->record_thread_work_item(G1GCPhaseTimes::Termination, worker_id, evac_term_attempts); 3314 } 3315 3316 assert(pss->queue_is_empty(), "should be empty"); 3317 3318 // Close the inner scope so that the ResourceMark and HandleMark 3319 // destructors are executed here and are included as part of the 3320 // "GC Worker Time". 3321 } 3322 _g1h->g1_policy()->phase_times()->record_time_secs(G1GCPhaseTimes::GCWorkerEnd, worker_id, os::elapsedTime()); 3323 } 3324 }; 3325 3326 void G1CollectedHeap::complete_cleaning(BoolObjectClosure* is_alive, 3327 bool class_unloading_occurred) { 3328 uint num_workers = workers()->active_workers(); 3329 ParallelCleaningTask unlink_task(is_alive, num_workers, class_unloading_occurred, false); 3330 workers()->run_task(&unlink_task); |