src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp

changeset 7040
da00a41842a5
parent 7011
ca8b8e21e2ca
child 7476
c2844108a708
equal deleted inserted replaced
7039:43aa571c1131 7040:da00a41842a5
1512 _cmsGen->contiguous_available()); 1512 _cmsGen->contiguous_available());
1513 gclog_or_tty->print_cr("promotion_rate=%g", stats().promotion_rate()); 1513 gclog_or_tty->print_cr("promotion_rate=%g", stats().promotion_rate());
1514 gclog_or_tty->print_cr("cms_allocation_rate=%g", stats().cms_allocation_rate()); 1514 gclog_or_tty->print_cr("cms_allocation_rate=%g", stats().cms_allocation_rate());
1515 gclog_or_tty->print_cr("occupancy=%3.7f", _cmsGen->occupancy()); 1515 gclog_or_tty->print_cr("occupancy=%3.7f", _cmsGen->occupancy());
1516 gclog_or_tty->print_cr("initiatingOccupancy=%3.7f", _cmsGen->initiating_occupancy()); 1516 gclog_or_tty->print_cr("initiatingOccupancy=%3.7f", _cmsGen->initiating_occupancy());
1517 gclog_or_tty->print_cr("cms_time_since_begin=%3.7f", stats().cms_time_since_begin());
1518 gclog_or_tty->print_cr("cms_time_since_end=%3.7f", stats().cms_time_since_end());
1517 gclog_or_tty->print_cr("metadata initialized %d", 1519 gclog_or_tty->print_cr("metadata initialized %d",
1518 MetaspaceGC::should_concurrent_collect()); 1520 MetaspaceGC::should_concurrent_collect());
1519 } 1521 }
1520 // ------------------------------------------------------------------ 1522 // ------------------------------------------------------------------
1521 1523
1572 if (MetaspaceGC::should_concurrent_collect()) { 1574 if (MetaspaceGC::should_concurrent_collect()) {
1573 if (Verbose && PrintGCDetails) { 1575 if (Verbose && PrintGCDetails) {
1574 gclog_or_tty->print("CMSCollector: collect for metadata allocation "); 1576 gclog_or_tty->print("CMSCollector: collect for metadata allocation ");
1575 } 1577 }
1576 return true; 1578 return true;
1579 }
1580
1581 // CMSTriggerInterval starts a CMS cycle if enough time has passed.
1582 if (CMSTriggerInterval >= 0) {
1583 if (CMSTriggerInterval == 0) {
1584 // Trigger always
1585 return true;
1586 }
1587
1588 // Check the CMS time since begin (we do not check the stats validity
1589 // as we want to be able to trigger the first CMS cycle as well)
1590 if (stats().cms_time_since_begin() >= (CMSTriggerInterval / ((double) MILLIUNITS))) {
1591 if (Verbose && PrintGCDetails) {
1592 if (stats().valid()) {
1593 gclog_or_tty->print_cr("CMSCollector: collect because of trigger interval (time since last begin %3.7f secs)",
1594 stats().cms_time_since_begin());
1595 } else {
1596 gclog_or_tty->print_cr("CMSCollector: collect because of trigger interval (first collection)");
1597 }
1598 }
1599 return true;
1600 }
1577 } 1601 }
1578 1602
1579 return false; 1603 return false;
1580 } 1604 }
1581 1605

mercurial