src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp

Print this page




   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
















  25 // ConcurrentMarkSweepGeneration is in support of a concurrent
  26 // mark-sweep old generation in the Detlefs-Printezis--Boehm-Demers-Schenker
  27 // style. We assume, for now, that this generation is always the
  28 // seniormost generation (modulo the PermGeneration), and for simplicity
  29 // in the first implementation, that this generation is a single compactible
  30 // space. Neither of these restrictions appears essential, and will be
  31 // relaxed in the future when more time is available to implement the
  32 // greater generality (and there's a need for it).
  33 //
  34 // Concurrent mode failures are currently handled by
  35 // means of a sliding mark-compact.
  36 
  37 class CMSAdaptiveSizePolicy;
  38 class CMSConcMarkingTask;
  39 class CMSGCAdaptivePolicyCounters;
  40 class ConcurrentMarkSweepGeneration;
  41 class ConcurrentMarkSweepPolicy;
  42 class ConcurrentMarkSweepThread;
  43 class CompactibleFreeListSpace;
  44 class FreeChunk;


1866   CMSBitMap*                      _dead_bit_map;
1867 public:
1868   MarkDeadObjectsClosure(const CMSCollector* collector,
1869                          const CompactibleFreeListSpace* sp,
1870                          CMSBitMap *live_bit_map,
1871                          CMSBitMap *dead_bit_map) :
1872     _collector(collector),
1873     _sp(sp),
1874     _live_bit_map(live_bit_map),
1875     _dead_bit_map(dead_bit_map) {}
1876   size_t do_blk(HeapWord* addr);
1877 };
1878 
1879 class TraceCMSMemoryManagerStats : public TraceMemoryManagerStats {
1880 
1881  public:
1882   TraceCMSMemoryManagerStats(CMSCollector::CollectorState phase);
1883   TraceCMSMemoryManagerStats();
1884 };
1885 




   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CONCURRENTMARKSWEEPGENERATION_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CONCURRENTMARKSWEEPGENERATION_HPP
  27 
  28 #include "gc_implementation/concurrentMarkSweep/freeBlockDictionary.hpp"
  29 #include "gc_implementation/shared/gSpaceCounters.hpp"
  30 #include "gc_implementation/shared/gcStats.hpp"
  31 #include "gc_implementation/shared/generationCounters.hpp"
  32 #include "memory/generation.hpp"
  33 #include "runtime/mutexLocker.hpp"
  34 #include "runtime/virtualspace.hpp"
  35 #include "services/memoryService.hpp"
  36 #include "utilities/bitMap.inline.hpp"
  37 #include "utilities/stack.inline.hpp"
  38 #include "utilities/taskqueue.hpp"
  39 #include "utilities/yieldingWorkgroup.hpp"
  40 
  41 // ConcurrentMarkSweepGeneration is in support of a concurrent
  42 // mark-sweep old generation in the Detlefs-Printezis--Boehm-Demers-Schenker
  43 // style. We assume, for now, that this generation is always the
  44 // seniormost generation (modulo the PermGeneration), and for simplicity
  45 // in the first implementation, that this generation is a single compactible
  46 // space. Neither of these restrictions appears essential, and will be
  47 // relaxed in the future when more time is available to implement the
  48 // greater generality (and there's a need for it).
  49 //
  50 // Concurrent mode failures are currently handled by
  51 // means of a sliding mark-compact.
  52 
  53 class CMSAdaptiveSizePolicy;
  54 class CMSConcMarkingTask;
  55 class CMSGCAdaptivePolicyCounters;
  56 class ConcurrentMarkSweepGeneration;
  57 class ConcurrentMarkSweepPolicy;
  58 class ConcurrentMarkSweepThread;
  59 class CompactibleFreeListSpace;
  60 class FreeChunk;


1882   CMSBitMap*                      _dead_bit_map;
1883 public:
1884   MarkDeadObjectsClosure(const CMSCollector* collector,
1885                          const CompactibleFreeListSpace* sp,
1886                          CMSBitMap *live_bit_map,
1887                          CMSBitMap *dead_bit_map) :
1888     _collector(collector),
1889     _sp(sp),
1890     _live_bit_map(live_bit_map),
1891     _dead_bit_map(dead_bit_map) {}
1892   size_t do_blk(HeapWord* addr);
1893 };
1894 
1895 class TraceCMSMemoryManagerStats : public TraceMemoryManagerStats {
1896 
1897  public:
1898   TraceCMSMemoryManagerStats(CMSCollector::CollectorState phase);
1899   TraceCMSMemoryManagerStats();
1900 };
1901 
1902 
1903 #endif // SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CONCURRENTMARKSWEEPGENERATION_HPP