3243 double term_sec = 0.0;
3244 size_t evac_term_attempts = 0;
3245 {
3246 double start = os::elapsedTime();
3247 G1ParEvacuateFollowersClosure evac(_g1h, pss, _queues, &_terminator);
3248 evac.do_void();
3249
3250 evac_term_attempts = evac.term_attempts();
3251 term_sec = evac.term_time();
3252 double elapsed_sec = os::elapsedTime() - start;
3253
3254 G1GCPhaseTimes* p = _g1h->g1_policy()->phase_times();
3255 p->add_time_secs(G1GCPhaseTimes::ObjCopy, worker_id, elapsed_sec - term_sec);
3256 p->record_time_secs(G1GCPhaseTimes::Termination, worker_id, term_sec);
3257 p->record_thread_work_item(G1GCPhaseTimes::Termination, worker_id, evac_term_attempts);
3258 }
3259
3260 assert(pss->queue_is_empty(), "should be empty");
3261
3262 if (log_is_enabled(Debug, gc, task, stats)) {
3263 MutexLockerEx x(ParGCRareEvent_lock, Mutex::_no_safepoint_check_flag);
3264 size_t lab_waste;
3265 size_t lab_undo_waste;
3266 pss->waste(lab_waste, lab_undo_waste);
3267 _g1h->print_termination_stats(worker_id,
3268 (os::elapsedTime() - start_sec) * 1000.0, /* elapsed time */
3269 strong_roots_sec * 1000.0, /* strong roots time */
3270 term_sec * 1000.0, /* evac term time */
3271 evac_term_attempts, /* evac term attempts */
3272 lab_waste, /* alloc buffer waste */
3273 lab_undo_waste /* undo waste */
3274 );
3275 }
3276
3277 // Close the inner scope so that the ResourceMark and HandleMark
3278 // destructors are executed here and are included as part of the
3279 // "GC Worker Time".
3280 }
3281 _g1h->g1_policy()->phase_times()->record_time_secs(G1GCPhaseTimes::GCWorkerEnd, worker_id, os::elapsedTime());
3282 }
3283 };
|
3243 double term_sec = 0.0;
3244 size_t evac_term_attempts = 0;
3245 {
3246 double start = os::elapsedTime();
3247 G1ParEvacuateFollowersClosure evac(_g1h, pss, _queues, &_terminator);
3248 evac.do_void();
3249
3250 evac_term_attempts = evac.term_attempts();
3251 term_sec = evac.term_time();
3252 double elapsed_sec = os::elapsedTime() - start;
3253
3254 G1GCPhaseTimes* p = _g1h->g1_policy()->phase_times();
3255 p->add_time_secs(G1GCPhaseTimes::ObjCopy, worker_id, elapsed_sec - term_sec);
3256 p->record_time_secs(G1GCPhaseTimes::Termination, worker_id, term_sec);
3257 p->record_thread_work_item(G1GCPhaseTimes::Termination, worker_id, evac_term_attempts);
3258 }
3259
3260 assert(pss->queue_is_empty(), "should be empty");
3261
3262 if (log_is_enabled(Debug, gc, task, stats)) {
3263 MutexLocker x(ParGCRareEvent_lock);
3264 size_t lab_waste;
3265 size_t lab_undo_waste;
3266 pss->waste(lab_waste, lab_undo_waste);
3267 _g1h->print_termination_stats(worker_id,
3268 (os::elapsedTime() - start_sec) * 1000.0, /* elapsed time */
3269 strong_roots_sec * 1000.0, /* strong roots time */
3270 term_sec * 1000.0, /* evac term time */
3271 evac_term_attempts, /* evac term attempts */
3272 lab_waste, /* alloc buffer waste */
3273 lab_undo_waste /* undo waste */
3274 );
3275 }
3276
3277 // Close the inner scope so that the ResourceMark and HandleMark
3278 // destructors are executed here and are included as part of the
3279 // "GC Worker Time".
3280 }
3281 _g1h->g1_policy()->phase_times()->record_time_secs(G1GCPhaseTimes::GCWorkerEnd, worker_id, os::elapsedTime());
3282 }
3283 };
|