Mon, 23 Jun 2008 16:49:37 -0700
6718086: CMS assert: _concurrent_iteration_safe_limit update missed
Summary: Initialize the field correctly in ContiguousSpace's constructor and initialize() methods, using the latter for the survivor spaces upon initial construction or a subsequent resizing of the young generation. Add some missing Space sub-class constructors.
Reviewed-by: apetrusenko
1.1 --- a/src/share/vm/memory/defNewGeneration.cpp Tue Jun 17 08:40:48 2008 -0700 1.2 +++ b/src/share/vm/memory/defNewGeneration.cpp Mon Jun 23 16:49:37 2008 -0700 1.3 @@ -227,8 +227,8 @@ 1.4 eden()->mangle_unused_area(); 1.5 } 1.6 } 1.7 - from()->set_bounds(fromMR); from()->clear(); 1.8 - to()->set_bounds(toMR); to()->clear(); 1.9 + from()->initialize(fromMR, true /* clear */); 1.10 + to()->initialize( toMR, true /* clear */); 1.11 // Make sure we compact eden, then from. 1.12 // The to-space is normally empty before a compaction so need 1.13 // not be considered. The exception is during promotion
2.1 --- a/src/share/vm/memory/space.cpp Tue Jun 17 08:40:48 2008 -0700 2.2 +++ b/src/share/vm/memory/space.cpp Mon Jun 23 16:49:37 2008 -0700 2.3 @@ -276,6 +276,7 @@ 2.4 set_top(bottom()); 2.5 set_saved_mark(); 2.6 if (clear_space) clear(); 2.7 + set_concurrent_iteration_safe_limit(top()); 2.8 } 2.9 2.10 void ContiguousSpace::clear() {
3.1 --- a/src/share/vm/memory/space.hpp Tue Jun 17 08:40:48 2008 -0700 3.2 +++ b/src/share/vm/memory/space.hpp Mon Jun 23 16:49:37 2008 -0700 3.3 @@ -373,6 +373,9 @@ 3.4 CompactibleSpace* _next_compaction_space; 3.5 3.6 public: 3.7 + CompactibleSpace() : 3.8 + _compaction_top(NULL), _next_compaction_space(NULL) {} 3.9 + 3.10 virtual void initialize(MemRegion mr, bool clear_space); 3.11 virtual void clear(); 3.12 3.13 @@ -766,6 +769,10 @@ 3.14 inline HeapWord* par_allocate_impl(size_t word_size, HeapWord* end_value); 3.15 3.16 public: 3.17 + ContiguousSpace() : 3.18 + _top(NULL), 3.19 + _concurrent_iteration_safe_limit(NULL) {} 3.20 + 3.21 virtual void initialize(MemRegion mr, bool clear_space); 3.22 3.23 // Accessors 3.24 @@ -970,7 +977,8 @@ 3.25 HeapWord* _soft_end; 3.26 3.27 public: 3.28 - EdenSpace(DefNewGeneration* gen) : _gen(gen) { _soft_end = NULL; } 3.29 + EdenSpace(DefNewGeneration* gen) : 3.30 + _gen(gen), _soft_end(NULL) {} 3.31 3.32 // Get/set just the 'soft' limit. 3.33 HeapWord* soft_end() { return _soft_end; }