< prev index next >
src/hotspot/share/gc/shared/genCollectedHeap.cpp
Print this page
rev 47972 : [mq]: open.patch
*** 262,278 ****
bool GenCollectedHeap::must_clear_all_soft_refs() {
return _gc_cause == GCCause::_metadata_GC_clear_soft_refs ||
_gc_cause == GCCause::_wb_full_gc;
}
! void GenCollectedHeap::collect_generation(Generation* gen, bool full, size_t size,
bool is_tlab, bool run_verification, bool clear_soft_refs,
bool restore_marks_for_biased_locking) {
FormatBuffer<> title("Collect gen: %s", gen->short_name());
GCTraceTime(Trace, gc, phases) t1(title);
TraceCollectorStats tcs(gen->counters());
! TraceMemoryManagerStats tmms(gen->kind(),gc_cause());
gen->stat_record()->invocations++;
gen->stat_record()->accumulated_time.start();
// Must be done anew before each collection because
--- 262,278 ----
bool GenCollectedHeap::must_clear_all_soft_refs() {
return _gc_cause == GCCause::_metadata_GC_clear_soft_refs ||
_gc_cause == GCCause::_wb_full_gc;
}
! void GenCollectedHeap::collect_generation(Generation* gen, GCMemoryManager* mem_mgr, bool full, size_t size,
bool is_tlab, bool run_verification, bool clear_soft_refs,
bool restore_marks_for_biased_locking) {
FormatBuffer<> title("Collect gen: %s", gen->short_name());
GCTraceTime(Trace, gc, phases) t1(title);
TraceCollectorStats tcs(gen->counters());
! TraceMemoryManagerStats tmms(mem_mgr, gc_cause());
gen->stat_record()->invocations++;
gen->stat_record()->accumulated_time.start();
// Must be done anew before each collection because
*** 412,421 ****
--- 412,422 ----
prepare_for_verify();
prepared_for_verification = true;
}
collect_generation(_young_gen,
+ _young_mgr,
full,
size,
is_tlab,
run_verification && VerifyGCLevel <= 0,
do_clear_all_soft_refs,
*** 443,456 ****
if (do_young_collection) {
// We did a young GC. Need a new GC id for the old GC.
GCIdMarkAndRestore gc_id_mark;
GCTraceTime(Info, gc) t("Pause Full", NULL, gc_cause(), true);
! collect_generation(_old_gen, full, size, is_tlab, run_verification && VerifyGCLevel <= 1, do_clear_all_soft_refs, true);
} else {
// No young GC done. Use the same GC id as was set up earlier in this method.
! collect_generation(_old_gen, full, size, is_tlab, run_verification && VerifyGCLevel <= 1, do_clear_all_soft_refs, true);
}
must_restore_marks_for_biased_locking = true;
collected_old = true;
}
--- 444,457 ----
if (do_young_collection) {
// We did a young GC. Need a new GC id for the old GC.
GCIdMarkAndRestore gc_id_mark;
GCTraceTime(Info, gc) t("Pause Full", NULL, gc_cause(), true);
! collect_generation(_old_gen, _old_mgr, full, size, is_tlab, run_verification && VerifyGCLevel <= 1, do_clear_all_soft_refs, true);
} else {
// No young GC done. Use the same GC id as was set up earlier in this method.
! collect_generation(_old_gen, _old_mgr, full, size, is_tlab, run_verification && VerifyGCLevel <= 1, do_clear_all_soft_refs, true);
}
must_restore_marks_for_biased_locking = true;
collected_old = true;
}
< prev index next >