< prev index next >
src/share/vm/gc/g1/g1CollectedHeap.cpp
Print this page
rev 13233 : 8179268: Factor out AdaptiveSizePolicy from top-level interfaces CollectorPolicy and CollectedHeap
@@ -1185,15 +1185,10 @@
size_t metadata_prev_used = MetaspaceAux::used_bytes();
_verifier->verify_region_sets_optional();
- const bool do_clear_all_soft_refs = clear_all_soft_refs ||
- collector_policy()->should_clear_all_soft_refs();
-
- ClearedAllSoftRefs casr(do_clear_all_soft_refs, collector_policy());
-
{
IsGCActiveMark x;
// Timing
assert(!GCCause::is_user_requested_gc(gc_cause()) || explicit_gc, "invariant");
@@ -1269,16 +1264,16 @@
// Temporarily clear the STW ref processor's _is_alive_non_header field.
ReferenceProcessorIsAliveMutator stw_rp_is_alive_null(ref_processor_stw(), NULL);
ref_processor_stw()->enable_discovery();
- ref_processor_stw()->setup_policy(do_clear_all_soft_refs);
+ ref_processor_stw()->setup_policy(clear_all_soft_refs);
// Do collection work
{
HandleMark hm; // Discard invalid handles created during gc
- G1MarkSweep::invoke_at_safepoint(ref_processor_stw(), do_clear_all_soft_refs);
+ G1MarkSweep::invoke_at_safepoint(ref_processor_stw(), clear_all_soft_refs);
}
assert(num_free_regions() == 0, "we should not have added any free regions");
rebuild_region_sets(false /* free_list_only */);
@@ -1567,13 +1562,10 @@
if (result != NULL) {
assert(*succeeded, "sanity");
return result;
}
- assert(!collector_policy()->should_clear_all_soft_refs(),
- "Flag should have been handled and cleared prior to this point");
-
// What else? We might try synchronous finalization later. If the total
// space available is large enough for the allocation, then a more
// complete compaction phase than we've tried so far might be
// appropriate.
assert(*succeeded, "sanity");
< prev index next >