462 for (int i = 0; i < length(); ++i) {
463 ParScanThreadState& par_scan_state = thread_state(i);
464
465 // Flush stats related to To-space PLAB activity and
466 // retire the last buffer.
467 par_scan_state.to_space_alloc_buffer()->
468 flush_stats_and_retire(_gen.plab_stats(),
469 true /* end_of_gc */,
470 false /* retain */);
471
472 // Every thread has its own age table. We need to merge
473 // them all into one.
474 ageTable *local_table = par_scan_state.age_table();
475 _gen.age_table()->merge(local_table);
476
477 // Inform old gen that we're done.
478 _next_gen.par_promote_alloc_done(i);
479 _next_gen.par_oop_since_save_marks_iterate_done(i);
480 }
481
482 if (UseConcMarkSweepGC && ParallelGCThreads > 0) {
483 // We need to call this even when ResizeOldPLAB is disabled
484 // so as to avoid breaking some asserts. While we may be able
485 // to avoid this by reorganizing the code a bit, I am loathe
486 // to do that unless we find cases where ergo leads to bad
487 // performance.
488 CFLS_LAB::compute_desired_plab_size();
489 }
490 }
491
492 ParScanClosure::ParScanClosure(ParNewGeneration* g,
493 ParScanThreadState* par_scan_state) :
494 OopsInKlassOrGenClosure(g), _par_scan_state(par_scan_state), _g(g)
495 {
496 assert(_g->level() == 0, "Optimized for youngest generation");
497 _boundary = _g->reserved().end();
498 }
499
500 void ParScanWithBarrierClosure::do_oop(oop* p) { ParScanClosure::do_oop_work(p, true, false); }
501 void ParScanWithBarrierClosure::do_oop(narrowOop* p) { ParScanClosure::do_oop_work(p, true, false); }
502
|
462 for (int i = 0; i < length(); ++i) {
463 ParScanThreadState& par_scan_state = thread_state(i);
464
465 // Flush stats related to To-space PLAB activity and
466 // retire the last buffer.
467 par_scan_state.to_space_alloc_buffer()->
468 flush_stats_and_retire(_gen.plab_stats(),
469 true /* end_of_gc */,
470 false /* retain */);
471
472 // Every thread has its own age table. We need to merge
473 // them all into one.
474 ageTable *local_table = par_scan_state.age_table();
475 _gen.age_table()->merge(local_table);
476
477 // Inform old gen that we're done.
478 _next_gen.par_promote_alloc_done(i);
479 _next_gen.par_oop_since_save_marks_iterate_done(i);
480 }
481
482 if (UseConcMarkSweepGC) {
483 // We need to call this even when ResizeOldPLAB is disabled
484 // so as to avoid breaking some asserts. While we may be able
485 // to avoid this by reorganizing the code a bit, I am loathe
486 // to do that unless we find cases where ergo leads to bad
487 // performance.
488 CFLS_LAB::compute_desired_plab_size();
489 }
490 }
491
492 ParScanClosure::ParScanClosure(ParNewGeneration* g,
493 ParScanThreadState* par_scan_state) :
494 OopsInKlassOrGenClosure(g), _par_scan_state(par_scan_state), _g(g)
495 {
496 assert(_g->level() == 0, "Optimized for youngest generation");
497 _boundary = _g->reserved().end();
498 }
499
500 void ParScanWithBarrierClosure::do_oop(oop* p) { ParScanClosure::do_oop_work(p, true, false); }
501 void ParScanWithBarrierClosure::do_oop(narrowOop* p) { ParScanClosure::do_oop_work(p, true, false); }
502
|