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