提交 22137c19 编写于 作者: Y ysr

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
上级 50aa3339
...@@ -227,8 +227,8 @@ void DefNewGeneration::compute_space_boundaries(uintx minimum_eden_size) { ...@@ -227,8 +227,8 @@ void DefNewGeneration::compute_space_boundaries(uintx minimum_eden_size) {
eden()->mangle_unused_area(); eden()->mangle_unused_area();
} }
} }
from()->set_bounds(fromMR); from()->clear(); from()->initialize(fromMR, true /* clear */);
to()->set_bounds(toMR); to()->clear(); to()->initialize( toMR, true /* clear */);
// Make sure we compact eden, then from. // Make sure we compact eden, then from.
// The to-space is normally empty before a compaction so need // The to-space is normally empty before a compaction so need
// not be considered. The exception is during promotion // not be considered. The exception is during promotion
......
...@@ -276,6 +276,7 @@ void ContiguousSpace::initialize(MemRegion mr, bool clear_space) { ...@@ -276,6 +276,7 @@ void ContiguousSpace::initialize(MemRegion mr, bool clear_space) {
set_top(bottom()); set_top(bottom());
set_saved_mark(); set_saved_mark();
if (clear_space) clear(); if (clear_space) clear();
set_concurrent_iteration_safe_limit(top());
} }
void ContiguousSpace::clear() { void ContiguousSpace::clear() {
......
...@@ -373,6 +373,9 @@ private: ...@@ -373,6 +373,9 @@ private:
CompactibleSpace* _next_compaction_space; CompactibleSpace* _next_compaction_space;
public: public:
CompactibleSpace() :
_compaction_top(NULL), _next_compaction_space(NULL) {}
virtual void initialize(MemRegion mr, bool clear_space); virtual void initialize(MemRegion mr, bool clear_space);
virtual void clear(); virtual void clear();
...@@ -766,6 +769,10 @@ class ContiguousSpace: public CompactibleSpace { ...@@ -766,6 +769,10 @@ class ContiguousSpace: public CompactibleSpace {
inline HeapWord* par_allocate_impl(size_t word_size, HeapWord* end_value); inline HeapWord* par_allocate_impl(size_t word_size, HeapWord* end_value);
public: public:
ContiguousSpace() :
_top(NULL),
_concurrent_iteration_safe_limit(NULL) {}
virtual void initialize(MemRegion mr, bool clear_space); virtual void initialize(MemRegion mr, bool clear_space);
// Accessors // Accessors
...@@ -970,7 +977,8 @@ class EdenSpace : public ContiguousSpace { ...@@ -970,7 +977,8 @@ class EdenSpace : public ContiguousSpace {
HeapWord* _soft_end; HeapWord* _soft_end;
public: public:
EdenSpace(DefNewGeneration* gen) : _gen(gen) { _soft_end = NULL; } EdenSpace(DefNewGeneration* gen) :
_gen(gen), _soft_end(NULL) {}
// Get/set just the 'soft' limit. // Get/set just the 'soft' limit.
HeapWord* soft_end() { return _soft_end; } HeapWord* soft_end() { return _soft_end; }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册