comparison src/share/vm/memory/defNewGeneration.cpp @ 1145:e018e6884bd8

6631166: CMS: better heuristics when combatting fragmentation Summary: Autonomic per-worker free block cache sizing, tunable coalition policies, fixes to per-size block statistics, retuned gain and bandwidth of some feedback loop filters to allow quicker reactivity to abrupt changes in ambient demand, and other heuristics to reduce fragmentation of the CMS old gen. Also tightened some assertions, including those related to locking. Reviewed-by: jmasa
author ysr
date Wed, 23 Dec 2009 09:23:54 -0800
parents 148e5441d916
children 0bfd3fb24150
comparison
equal deleted inserted replaced
1111:44f61c24ddab 1145:e018e6884bd8
607 delete _promo_failure_scan_stack; 607 delete _promo_failure_scan_stack;
608 _promo_failure_scan_stack = NULL; 608 _promo_failure_scan_stack = NULL;
609 609
610 remove_forwarding_pointers(); 610 remove_forwarding_pointers();
611 if (PrintGCDetails) { 611 if (PrintGCDetails) {
612 gclog_or_tty->print(" (promotion failed)"); 612 gclog_or_tty->print(" (promotion failed) ");
613 } 613 }
614 // Add to-space to the list of space to compact 614 // Add to-space to the list of space to compact
615 // when a promotion failure has occurred. In that 615 // when a promotion failure has occurred. In that
616 // case there can be live objects in to-space 616 // case there can be live objects in to-space
617 // as a result of a partial evacuation of eden 617 // as a result of a partial evacuation of eden
618 // and from-space. 618 // and from-space.
619 swap_spaces(); // For the sake of uniformity wrt ParNewGeneration::collect(). 619 swap_spaces(); // For the sake of uniformity wrt ParNewGeneration::collect().
620 from()->set_next_compaction_space(to()); 620 from()->set_next_compaction_space(to());
621 gch->set_incremental_collection_will_fail(); 621 gch->set_incremental_collection_will_fail();
622
623 // Inform the next generation that a promotion failure occurred.
624 _next_gen->promotion_failure_occurred();
622 625
623 // Reset the PromotionFailureALot counters. 626 // Reset the PromotionFailureALot counters.
624 NOT_PRODUCT(Universe::heap()->reset_promotion_should_fail();) 627 NOT_PRODUCT(Universe::heap()->reset_promotion_should_fail();)
625 } 628 }
626 // set new iteration safe limit for the survivor spaces 629 // set new iteration safe limit for the survivor spaces
677 } 680 }
678 } 681 }
679 682
680 void DefNewGeneration::handle_promotion_failure(oop old) { 683 void DefNewGeneration::handle_promotion_failure(oop old) {
681 preserve_mark_if_necessary(old, old->mark()); 684 preserve_mark_if_necessary(old, old->mark());
685 if (!_promotion_failed && PrintPromotionFailure) {
686 gclog_or_tty->print(" (promotion failure size = " SIZE_FORMAT ") ",
687 old->size());
688 }
689
682 // forward to self 690 // forward to self
683 old->forward_to(old); 691 old->forward_to(old);
684 _promotion_failed = true; 692 _promotion_failed = true;
685 693
686 push_on_promo_failure_scan_stack(old); 694 push_on_promo_failure_scan_stack(old);