OpenJDK / jdk / jdk
changeset 27888:a52ea0e7671e
8065218: Move CMS-specific fields from Space to CompactibleFreeListSpace
Reviewed-by: brutisso, tschatzl, sangheki
author | mgerdin |
---|---|
date | Wed, 26 Nov 2014 10:51:52 +0100 |
parents | 8e793accbf05 |
children | 7d50f95e0076 |
files | hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp hotspot/src/share/vm/memory/space.hpp |
diffstat | 3 files changed, 16 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Fri May 17 17:24:20 2013 +0200 +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Wed Nov 26 10:51:52 2014 +0100 @@ -90,7 +90,8 @@ CMSRescanMultiple), _marking_task_size(CardTableModRefBS::card_size_in_words * BitsPerWord * CMSConcMarkMultiple), - _collector(NULL) + _collector(NULL), + _preconsumptionDirtyCardClosure(NULL) { assert(sizeof(FreeChunk) / BytesPerWord <= MinChunkSize, "FreeChunk is larger than expected");
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp Fri May 17 17:24:20 2013 +0200 +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp Wed Nov 26 10:51:52 2014 +0100 @@ -155,6 +155,9 @@ // Used to keep track of limit of sweep for the space HeapWord* _sweep_limit; + // Used to make the young collector update the mod union table + MemRegionClosure* _preconsumptionDirtyCardClosure; + // Support for compacting cms HeapWord* cross_threshold(HeapWord* start, HeapWord* end); HeapWord* forward(oop q, size_t size, CompactPoint* cp, HeapWord* compact_top); @@ -356,6 +359,14 @@ void initialize_sequential_subtasks_for_marking(int n_threads, HeapWord* low = NULL); + virtual MemRegionClosure* preconsumptionDirtyCardClosure() const { + return _preconsumptionDirtyCardClosure; + } + + void setPreconsumptionDirtyCardClosure(MemRegionClosure* cl) { + _preconsumptionDirtyCardClosure = cl; + } + // Space enquiries size_t used() const; size_t free() const;
--- a/hotspot/src/share/vm/memory/space.hpp Fri May 17 17:24:20 2013 +0200 +++ b/hotspot/src/share/vm/memory/space.hpp Wed Nov 26 10:51:52 2014 +0100 @@ -70,15 +70,13 @@ // Used in support of save_marks() HeapWord* _saved_mark_word; - MemRegionClosure* _preconsumptionDirtyCardClosure; - // A sequential tasks done structure. This supports // parallel GC, where we have threads dynamically // claiming sub-tasks from a larger parallel task. SequentialSubTasksDone _par_seq_tasks; Space(): - _bottom(NULL), _end(NULL), _preconsumptionDirtyCardClosure(NULL) { } + _bottom(NULL), _end(NULL) { } public: // Accessors @@ -97,11 +95,8 @@ return (HeapWord*)obj >= saved_mark_word(); } - MemRegionClosure* preconsumptionDirtyCardClosure() const { - return _preconsumptionDirtyCardClosure; - } - void setPreconsumptionDirtyCardClosure(MemRegionClosure* cl) { - _preconsumptionDirtyCardClosure = cl; + virtual MemRegionClosure* preconsumptionDirtyCardClosure() const { + return NULL; } // Returns a subregion of the space containing only the allocated objects in