comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @ 11125:f4311079200c

8020155: PSR:PERF G1 not collecting old regions when humongous allocations interfer Summary: Take _last_young_gc into account when deciding on starting a concurrent mark. Also reviewed-by: per.liden@oracle.com. Reviewed-by: tschatzl, johnc
author brutisso
date Thu, 11 Jul 2013 11:33:27 +0200
parents f2110083203d
children 4c84d351cca9
comparison
equal deleted inserted replaced
11116:27c53c9f3a7e 11125:f4311079200c
871 (_g1->capacity() / 100) * InitiatingHeapOccupancyPercent; 871 (_g1->capacity() / 100) * InitiatingHeapOccupancyPercent;
872 size_t cur_used_bytes = _g1->non_young_capacity_bytes(); 872 size_t cur_used_bytes = _g1->non_young_capacity_bytes();
873 size_t alloc_byte_size = alloc_word_size * HeapWordSize; 873 size_t alloc_byte_size = alloc_word_size * HeapWordSize;
874 874
875 if ((cur_used_bytes + alloc_byte_size) > marking_initiating_used_threshold) { 875 if ((cur_used_bytes + alloc_byte_size) > marking_initiating_used_threshold) {
876 if (gcs_are_young()) { 876 if (gcs_are_young() && !_last_young_gc) {
877 ergo_verbose5(ErgoConcCycles, 877 ergo_verbose5(ErgoConcCycles,
878 "request concurrent cycle initiation", 878 "request concurrent cycle initiation",
879 ergo_format_reason("occupancy higher than threshold") 879 ergo_format_reason("occupancy higher than threshold")
880 ergo_format_byte("occupancy") 880 ergo_format_byte("occupancy")
881 ergo_format_byte("allocation request") 881 ergo_format_byte("allocation request")
929 #endif // PRODUCT 929 #endif // PRODUCT
930 930
931 last_pause_included_initial_mark = during_initial_mark_pause(); 931 last_pause_included_initial_mark = during_initial_mark_pause();
932 if (last_pause_included_initial_mark) { 932 if (last_pause_included_initial_mark) {
933 record_concurrent_mark_init_end(0.0); 933 record_concurrent_mark_init_end(0.0);
934 } else if (!_last_young_gc && need_to_start_conc_mark("end of GC")) { 934 } else if (need_to_start_conc_mark("end of GC")) {
935 // Note: this might have already been set, if during the last 935 // Note: this might have already been set, if during the last
936 // pause we decided to start a cycle but at the beginning of 936 // pause we decided to start a cycle but at the beginning of
937 // this pause we decided to postpone it. That's OK. 937 // this pause we decided to postpone it. That's OK.
938 set_initiate_conc_mark_if_possible(); 938 set_initiate_conc_mark_if_possible();
939 } 939 }