8077413: Avoid use of Universe::heap() inside collectors

Reviewed-by: stefank, kbarrett
This commit is contained in:
Per Lidén 2015-04-13 15:47:48 +02:00
parent f078697a45
commit ca9afd25f6
42 changed files with 172 additions and 249 deletions

View file

@ -101,11 +101,6 @@ void G1MarkSweep::invoke_at_safepoint(ReferenceProcessor* rp,
BiasedLocking::restore_marks();
GenMarkSweep::deallocate_stacks();
// "free at last gc" is calculated from these.
// CHF: cheating for now!!!
// Universe::set_heap_capacity_at_last_gc(Universe::heap()->capacity());
// Universe::set_heap_used_at_last_gc(Universe::heap()->used());
CodeCache::gc_epilogue();
JvmtiExport::gc_epilogue();
@ -167,12 +162,12 @@ void G1MarkSweep::mark_sweep_phase1(bool& marked_for_unloading,
Klass::clean_weak_klass_links(&GenMarkSweep::is_alive);
// Delete entries for dead interned string and clean up unreferenced symbols in symbol table.
G1CollectedHeap::heap()->unlink_string_and_symbol_table(&GenMarkSweep::is_alive);
g1h->unlink_string_and_symbol_table(&GenMarkSweep::is_alive);
if (VerifyDuringGC) {
HandleMark hm; // handle scope
COMPILER2_PRESENT(DerivedPointerTableDeactivate dpt_deact);
Universe::heap()->prepare_for_verify();
g1h->prepare_for_verify();
// Note: we can verify only the heap here. When an object is
// marked, the previous value of the mark word (including
// identity hash values, ages, etc) is preserved, and the mark
@ -186,7 +181,7 @@ void G1MarkSweep::mark_sweep_phase1(bool& marked_for_unloading,
if (!VerifySilently) {
gclog_or_tty->print(" VerifyDuringGC:(full)[Verifying ");
}
Universe::heap()->verify(VerifySilently, VerifyOption_G1UseMarkWord);
g1h->verify(VerifySilently, VerifyOption_G1UseMarkWord);
if (!VerifySilently) {
gclog_or_tty->print_cr("]");
}