Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp @ 2132:4947ee68d19c
7008136: CMS: assert((HeapWord*)nextChunk <= _limit) failed: sweep invariant
Summary: The recorded _sweep_limit may not necessarily remain a block boundary as the old generation expands during a concurrent cycle. Terminal actions inside the sweep closure need to be aware of this as they cross over the limit.
Reviewed-by: johnc, minqi
author | ysr |
---|---|
date | Thu, 06 Jan 2011 23:50:02 -0800 |
parents | f95d63e2154a |
children | 92da084fefc9 |
comparison
equal
deleted
inserted
replaced
2075:06e4b9c9db76 | 2132:4947ee68d19c |
---|---|
1699 // _freeFinger is the address of the current LHC | 1699 // _freeFinger is the address of the current LHC |
1700 class SweepClosure: public BlkClosureCareful { | 1700 class SweepClosure: public BlkClosureCareful { |
1701 CMSCollector* _collector; // collector doing the work | 1701 CMSCollector* _collector; // collector doing the work |
1702 ConcurrentMarkSweepGeneration* _g; // Generation being swept | 1702 ConcurrentMarkSweepGeneration* _g; // Generation being swept |
1703 CompactibleFreeListSpace* _sp; // Space being swept | 1703 CompactibleFreeListSpace* _sp; // Space being swept |
1704 HeapWord* _limit; | 1704 HeapWord* _limit;// the address at which the sweep should stop because |
1705 // we do not expect blocks eligible for sweeping past | |
1706 // that address. | |
1705 Mutex* _freelistLock; // Free list lock (in space) | 1707 Mutex* _freelistLock; // Free list lock (in space) |
1706 CMSBitMap* _bitMap; // Marking bit map (in | 1708 CMSBitMap* _bitMap; // Marking bit map (in |
1707 // generation) | 1709 // generation) |
1708 bool _inFreeRange; // Indicates if we are in the | 1710 bool _inFreeRange; // Indicates if we are in the |
1709 // midst of a free run | 1711 // midst of a free run |
1743 FreeChunk* _last_fc; | 1745 FreeChunk* _last_fc; |
1744 ) | 1746 ) |
1745 private: | 1747 private: |
1746 // Code that is common to a free chunk or garbage when | 1748 // Code that is common to a free chunk or garbage when |
1747 // encountered during sweeping. | 1749 // encountered during sweeping. |
1748 void doPostIsFreeOrGarbageChunk(FreeChunk *fc, | 1750 void do_post_free_or_garbage_chunk(FreeChunk *fc, size_t chunkSize); |
1749 size_t chunkSize); | |
1750 // Process a free chunk during sweeping. | 1751 // Process a free chunk during sweeping. |
1751 void doAlreadyFreeChunk(FreeChunk *fc); | 1752 void do_already_free_chunk(FreeChunk *fc); |
1752 // Process a garbage chunk during sweeping. | 1753 // Process a garbage chunk during sweeping. |
1753 size_t doGarbageChunk(FreeChunk *fc); | 1754 size_t do_garbage_chunk(FreeChunk *fc); |
1754 // Process a live chunk during sweeping. | 1755 // Process a live chunk during sweeping. |
1755 size_t doLiveChunk(FreeChunk* fc); | 1756 size_t do_live_chunk(FreeChunk* fc); |
1756 | 1757 |
1757 // Accessors. | 1758 // Accessors. |
1758 HeapWord* freeFinger() const { return _freeFinger; } | 1759 HeapWord* freeFinger() const { return _freeFinger; } |
1759 void set_freeFinger(HeapWord* v) { _freeFinger = v; } | 1760 void set_freeFinger(HeapWord* v) { _freeFinger = v; } |
1760 size_t freeRangeSize() const { return _freeRangeSize; } | 1761 size_t freeRangeSize() const { return _freeRangeSize; } |
1767 void set_freeRangeInFreeLists(bool v) { _freeRangeInFreeLists = v; } | 1768 void set_freeRangeInFreeLists(bool v) { _freeRangeInFreeLists = v; } |
1768 | 1769 |
1769 // Initialize a free range. | 1770 // Initialize a free range. |
1770 void initialize_free_range(HeapWord* freeFinger, bool freeRangeInFreeLists); | 1771 void initialize_free_range(HeapWord* freeFinger, bool freeRangeInFreeLists); |
1771 // Return this chunk to the free lists. | 1772 // Return this chunk to the free lists. |
1772 void flushCurFreeChunk(HeapWord* chunk, size_t size); | 1773 void flush_cur_free_chunk(HeapWord* chunk, size_t size); |
1773 | 1774 |
1774 // Check if we should yield and do so when necessary. | 1775 // Check if we should yield and do so when necessary. |
1775 inline void do_yield_check(HeapWord* addr); | 1776 inline void do_yield_check(HeapWord* addr); |
1776 | 1777 |
1777 // Yield | 1778 // Yield |