comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp @ 22901:c132be0fb74d

8060025: Object copy time regressions after JDK-8031323 and JDK-8057536 Summary: Evaluate and improve object copy time by micro-optimizations and splitting out slow and fast paths aggressively. Reviewed-by: kbarrett, mgerdin, jmasa Contributed-by: Tony Printezis <tprintezis@twitter.com>, Thomas Schatzl <thomas.schatzl@oracle.com>
author tschatzl
date Fri, 19 Dec 2014 09:21:06 +0100
parents b840813adfcc
children dd9cc155639c
comparison
equal deleted inserted replaced
22900:dfa21a177d66 22901:c132be0fb74d
875 ageTable _survivors_age_table; 875 ageTable _survivors_age_table;
876 876
877 public: 877 public:
878 uint tenuring_threshold() const { return _tenuring_threshold; } 878 uint tenuring_threshold() const { return _tenuring_threshold; }
879 879
880 inline GCAllocPurpose
881 evacuation_destination(HeapRegion* src_region, uint age, size_t word_sz) {
882 if (age < _tenuring_threshold && src_region->is_young()) {
883 return GCAllocForSurvived;
884 } else {
885 return GCAllocForTenured;
886 }
887 }
888
889 inline bool track_object_age(GCAllocPurpose purpose) {
890 return purpose == GCAllocForSurvived;
891 }
892
893 static const uint REGIONS_UNLIMITED = (uint) -1; 880 static const uint REGIONS_UNLIMITED = (uint) -1;
894 881
895 uint max_regions(int purpose); 882 uint max_regions(InCSetState dest) {
896 883 switch (dest.value()) {
897 // The limit on regions for a particular purpose is reached. 884 case InCSetState::Young:
898 void note_alloc_region_limit_reached(int purpose) { 885 return _max_survivor_regions;
899 if (purpose == GCAllocForSurvived) { 886 case InCSetState::Old:
900 _tenuring_threshold = 0; 887 return REGIONS_UNLIMITED;
888 default:
889 assert(false, err_msg("Unknown dest state: " CSETSTATE_FORMAT, dest.value()));
890 break;
901 } 891 }
892 // keep some compilers happy
893 return 0;
902 } 894 }
903 895
904 void note_start_adding_survivor_regions() { 896 void note_start_adding_survivor_regions() {
905 _survivor_surv_rate_group->start_adding_regions(); 897 _survivor_surv_rate_group->start_adding_regions();
906 } 898 }