1479 // collector, there may be references on the discovered
1480 // references lists. Abandon those references, since some
1481 // of them may have become unreachable after concurrent
1482 // discovery; the STW compacting collector will redo discovery
1483 // more precisely, without being subject to floating garbage.
1484 // Leaving otherwise unreachable references in the discovered
1485 // lists would require special handling.
1486 ref_processor()->disable_discovery();
1487 ref_processor()->abandon_partial_discovery();
1488 ref_processor()->verify_no_references_recorded();
1489
1490 if (first_state > Idling) {
1491 save_heap_summary();
1492 }
1493
1494 do_compaction_work(clear_all_soft_refs);
1495
1496 // Has the GC time limit been exceeded?
1497 size_t max_eden_size = _young_gen->max_eden_size();
1498 GCCause::Cause gc_cause = heap->gc_cause();
1499 size_policy()->check_gc_overhead_limit(_young_gen->used(),
1500 _young_gen->eden()->used(),
1501 _cmsGen->max_capacity(),
1502 max_eden_size,
1503 full,
1504 gc_cause,
1505 heap->soft_ref_policy());
1506
1507 // Reset the expansion cause, now that we just completed
1508 // a collection cycle.
1509 clear_expansion_cause();
1510 _foregroundGCIsActive = false;
1511 return;
1512 }
1513
1514 // Resize the tenured generation
1515 // after obtaining the free list locks for the
1516 // two generations.
1517 void CMSCollector::compute_new_size() {
1518 assert_locked_or_safepoint(Heap_lock);
1519 FreelistLocker z(this);
1520 MetaspaceGC::compute_new_size();
|
1479 // collector, there may be references on the discovered
1480 // references lists. Abandon those references, since some
1481 // of them may have become unreachable after concurrent
1482 // discovery; the STW compacting collector will redo discovery
1483 // more precisely, without being subject to floating garbage.
1484 // Leaving otherwise unreachable references in the discovered
1485 // lists would require special handling.
1486 ref_processor()->disable_discovery();
1487 ref_processor()->abandon_partial_discovery();
1488 ref_processor()->verify_no_references_recorded();
1489
1490 if (first_state > Idling) {
1491 save_heap_summary();
1492 }
1493
1494 do_compaction_work(clear_all_soft_refs);
1495
1496 // Has the GC time limit been exceeded?
1497 size_t max_eden_size = _young_gen->max_eden_size();
1498 GCCause::Cause gc_cause = heap->gc_cause();
1499 size_policy()->check_gc_overhead_limit(_young_gen->eden()->used(),
1500 _cmsGen->max_capacity(),
1501 max_eden_size,
1502 full,
1503 gc_cause,
1504 heap->soft_ref_policy());
1505
1506 // Reset the expansion cause, now that we just completed
1507 // a collection cycle.
1508 clear_expansion_cause();
1509 _foregroundGCIsActive = false;
1510 return;
1511 }
1512
1513 // Resize the tenured generation
1514 // after obtaining the free list locks for the
1515 // two generations.
1516 void CMSCollector::compute_new_size() {
1517 assert_locked_or_safepoint(Heap_lock);
1518 FreelistLocker z(this);
1519 MetaspaceGC::compute_new_size();
|