Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/parNew/parNewGeneration.cpp @ 7609:a30e7b564541
8005972: ParNew should not update the tenuring threshold when promotion failed has occurred
Reviewed-by: ysr, johnc, jwilhelm
author | brutisso |
---|---|
date | Mon, 14 Jan 2013 21:30:45 +0100 |
parents | ca0a78017dc7 |
children | f2110083203d |
comparison
equal
deleted
inserted
replaced
7608:689e1218d7fe | 7609:a30e7b564541 |
---|---|
876 } | 876 } |
877 | 877 |
878 | 878 |
879 bool ParNewGeneration::_avoid_promotion_undo = false; | 879 bool ParNewGeneration::_avoid_promotion_undo = false; |
880 | 880 |
881 void ParNewGeneration::adjust_desired_tenuring_threshold() { | |
882 // Set the desired survivor size to half the real survivor space | |
883 _tenuring_threshold = | |
884 age_table()->compute_tenuring_threshold(to()->capacity()/HeapWordSize); | |
885 } | |
886 | |
887 // A Generation that does parallel young-gen collection. | 881 // A Generation that does parallel young-gen collection. |
888 | 882 |
889 void ParNewGeneration::collect(bool full, | 883 void ParNewGeneration::collect(bool full, |
890 bool clear_all_soft_refs, | 884 bool clear_all_soft_refs, |
891 size_t size, | 885 size_t size, |
1011 // A successful scavenge should restart the GC time limit count which is | 1005 // A successful scavenge should restart the GC time limit count which is |
1012 // for full GC's. | 1006 // for full GC's. |
1013 size_policy->reset_gc_overhead_limit_count(); | 1007 size_policy->reset_gc_overhead_limit_count(); |
1014 | 1008 |
1015 assert(to()->is_empty(), "to space should be empty now"); | 1009 assert(to()->is_empty(), "to space should be empty now"); |
1010 | |
1011 adjust_desired_tenuring_threshold(); | |
1016 } else { | 1012 } else { |
1017 assert(_promo_failure_scan_stack.is_empty(), "post condition"); | 1013 assert(_promo_failure_scan_stack.is_empty(), "post condition"); |
1018 _promo_failure_scan_stack.clear(true); // Clear cached segments. | 1014 _promo_failure_scan_stack.clear(true); // Clear cached segments. |
1019 | 1015 |
1020 remove_forwarding_pointers(); | 1016 remove_forwarding_pointers(); |
1033 } | 1029 } |
1034 // set new iteration safe limit for the survivor spaces | 1030 // set new iteration safe limit for the survivor spaces |
1035 from()->set_concurrent_iteration_safe_limit(from()->top()); | 1031 from()->set_concurrent_iteration_safe_limit(from()->top()); |
1036 to()->set_concurrent_iteration_safe_limit(to()->top()); | 1032 to()->set_concurrent_iteration_safe_limit(to()->top()); |
1037 | 1033 |
1038 adjust_desired_tenuring_threshold(); | |
1039 if (ResizePLAB) { | 1034 if (ResizePLAB) { |
1040 plab_stats()->adjust_desired_plab_sz(n_workers); | 1035 plab_stats()->adjust_desired_plab_sz(n_workers); |
1041 } | 1036 } |
1042 | 1037 |
1043 if (PrintGC && !PrintGCDetails) { | 1038 if (PrintGC && !PrintGCDetails) { |