comparison src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @ 10243:a9d568b7df60

8013032: CMS: assert(used() == used_after_gc && used_after_gc <= capacity()) failed: used: 0 used_after_gc: 292080 capacity: 1431699456 Reviewed-by: tschatzl, mgerdin, johnc
author jmasa
date Wed, 08 May 2013 16:28:03 -0700
parents 2f50bc369470
children 06ab37f08701
comparison
equal deleted inserted replaced
10242:b0d20fa374b4 10243:a9d568b7df60
915 clear_incremental_collection_failed(); 915 clear_incremental_collection_failed();
916 grow_to_reserved(); 916 grow_to_reserved();
917 return; 917 return;
918 } 918 }
919 919
920 // Compute some numbers about the state of the heap. 920 // The heap has been compacted but not reset yet.
921 const size_t used_after_gc = used(); 921 // Any metric such as free() or used() will be incorrect.
922 const size_t capacity_after_gc = capacity();
923 922
924 CardGeneration::compute_new_size(); 923 CardGeneration::compute_new_size();
925 924
926 // Reset again after a possible resizing 925 // Reset again after a possible resizing
927 cmsSpace()->reset_after_compaction(); 926 cmsSpace()->reset_after_compaction();
928 927
929 assert(used() == used_after_gc && used_after_gc <= capacity(),
930 err_msg("used: " SIZE_FORMAT " used_after_gc: " SIZE_FORMAT
931 " capacity: " SIZE_FORMAT, used(), used_after_gc, capacity()));
932 } 928 }
933 929
934 void ConcurrentMarkSweepGeneration::compute_new_size_free_list() { 930 void ConcurrentMarkSweepGeneration::compute_new_size_free_list() {
935 assert_locked_or_safepoint(Heap_lock); 931 assert_locked_or_safepoint(Heap_lock);
936 932