mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-16 00:54:38 +02:00
8008508: CMS does not correctly reduce heap size after a Full GC
Reviewed-by: johnc, ysr
This commit is contained in:
parent
90d010120f
commit
fabb8c6e25
7 changed files with 269 additions and 230 deletions
|
@ -60,6 +60,7 @@ class CompactibleFreeListSpace;
|
|||
class FreeChunk;
|
||||
class PromotionInfo;
|
||||
class ScanMarkedObjectsAgainCarefullyClosure;
|
||||
class TenuredGeneration;
|
||||
|
||||
// A generic CMS bit map. It's the basis for both the CMS marking bit map
|
||||
// as well as for the mod union table (in each case only a subset of the
|
||||
|
@ -810,9 +811,6 @@ class CMSCollector: public CHeapObj<mtGC> {
|
|||
// used regions of each generation to limit the extent of sweep
|
||||
void save_sweep_limits();
|
||||
|
||||
// Resize the generations included in the collector.
|
||||
void compute_new_size();
|
||||
|
||||
// A work method used by foreground collection to determine
|
||||
// what type of collection (compacting or not, continuing or fresh)
|
||||
// it should do.
|
||||
|
@ -909,6 +907,9 @@ class CMSCollector: public CHeapObj<mtGC> {
|
|||
void releaseFreelistLocks() const;
|
||||
bool haveFreelistLocks() const;
|
||||
|
||||
// Adjust size of underlying generation
|
||||
void compute_new_size();
|
||||
|
||||
// GC prologue and epilogue
|
||||
void gc_prologue(bool full);
|
||||
void gc_epilogue(bool full);
|
||||
|
@ -1082,7 +1083,7 @@ class ConcurrentMarkSweepGeneration: public CardGeneration {
|
|||
|
||||
protected:
|
||||
// Shrink generation by specified size (returns false if unable to shrink)
|
||||
virtual void shrink_by(size_t bytes);
|
||||
void shrink_free_list_by(size_t bytes);
|
||||
|
||||
// Update statistics for GC
|
||||
virtual void update_gc_stats(int level, bool full);
|
||||
|
@ -1233,6 +1234,7 @@ class ConcurrentMarkSweepGeneration: public CardGeneration {
|
|||
CMSExpansionCause::Cause cause);
|
||||
virtual bool expand(size_t bytes, size_t expand_bytes);
|
||||
void shrink(size_t bytes);
|
||||
void shrink_by(size_t bytes);
|
||||
HeapWord* expand_and_par_lab_allocate(CMSParGCThreadState* ps, size_t word_sz);
|
||||
bool expand_and_ensure_spooling_space(PromotionInfo* promo);
|
||||
|
||||
|
@ -1293,7 +1295,13 @@ class ConcurrentMarkSweepGeneration: public CardGeneration {
|
|||
bool must_be_youngest() const { return false; }
|
||||
bool must_be_oldest() const { return true; }
|
||||
|
||||
void compute_new_size();
|
||||
// Resize the generation after a compacting GC. The
|
||||
// generation can be treated as a contiguous space
|
||||
// after the compaction.
|
||||
virtual void compute_new_size();
|
||||
// Resize the generation after a non-compacting
|
||||
// collection.
|
||||
void compute_new_size_free_list();
|
||||
|
||||
CollectionTypes debug_collection_type() { return _debug_collection_type; }
|
||||
void rotate_debug_collection_type();
|
||||
|
@ -1315,7 +1323,6 @@ class ASConcurrentMarkSweepGeneration : public ConcurrentMarkSweepGeneration {
|
|||
virtual void shrink_by(size_t bytes);
|
||||
|
||||
public:
|
||||
virtual void compute_new_size();
|
||||
ASConcurrentMarkSweepGeneration(ReservedSpace rs, size_t initial_byte_size,
|
||||
int level, CardTableRS* ct,
|
||||
bool use_adaptive_freelists,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue