Mercurial > hg > graal-compiler
comparison src/share/vm/memory/collectorPolicy.cpp @ 1888:a7214d79fcf1
6896603: CMS/GCH: collection_attempt_is_safe() ergo should use more recent data
Summary: Deprecated HandlePromotionFailure, removing the ability to turn off that feature, did away with one epoch look-ahead when deciding if a scavenge is likely to fail, relying on current data.
Reviewed-by: jmasa, johnc, poonam
author | ysr |
---|---|
date | Sat, 23 Oct 2010 23:03:49 -0700 |
parents | a8b66e00933b |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1887:cd3ef3fd20dd | 1888:a7214d79fcf1 |
---|---|
657 if (!gch->is_maximal_no_gc()) { | 657 if (!gch->is_maximal_no_gc()) { |
658 result = expand_heap_and_allocate(size, is_tlab); | 658 result = expand_heap_and_allocate(size, is_tlab); |
659 } | 659 } |
660 return result; // could be null if we are out of space | 660 return result; // could be null if we are out of space |
661 } else if (!gch->incremental_collection_will_fail()) { | 661 } else if (!gch->incremental_collection_will_fail()) { |
662 // The gc_prologues have not executed yet. The value | |
663 // for incremental_collection_will_fail() is the remanent | |
664 // of the last collection. | |
665 // Do an incremental collection. | 662 // Do an incremental collection. |
666 gch->do_collection(false /* full */, | 663 gch->do_collection(false /* full */, |
667 false /* clear_all_soft_refs */, | 664 false /* clear_all_soft_refs */, |
668 size /* size */, | 665 size /* size */, |
669 is_tlab /* is_tlab */, | 666 is_tlab /* is_tlab */, |
737 bool GenCollectorPolicy::should_try_older_generation_allocation( | 734 bool GenCollectorPolicy::should_try_older_generation_allocation( |
738 size_t word_size) const { | 735 size_t word_size) const { |
739 GenCollectedHeap* gch = GenCollectedHeap::heap(); | 736 GenCollectedHeap* gch = GenCollectedHeap::heap(); |
740 size_t gen0_capacity = gch->get_gen(0)->capacity_before_gc(); | 737 size_t gen0_capacity = gch->get_gen(0)->capacity_before_gc(); |
741 return (word_size > heap_word_size(gen0_capacity)) | 738 return (word_size > heap_word_size(gen0_capacity)) |
742 || (GC_locker::is_active_and_needs_gc()) | 739 || GC_locker::is_active_and_needs_gc() |
743 || ( gch->last_incremental_collection_failed() | 740 || gch->incremental_collection_failed(); |
744 && gch->incremental_collection_will_fail()); | |
745 } | 741 } |
746 | 742 |
747 | 743 |
748 // | 744 // |
749 // MarkSweepPolicy methods | 745 // MarkSweepPolicy methods |