< prev index next >

src/share/vm/gc/shared/genCollectedHeap.hpp

Print this page
rev 8362 : 8079792: GC directory structure cleanup
Reviewed-by:


   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_MEMORY_GENCOLLECTEDHEAP_HPP
  26 #define SHARE_VM_MEMORY_GENCOLLECTEDHEAP_HPP
  27 
  28 #include "gc_implementation/shared/adaptiveSizePolicy.hpp"
  29 #include "gc_interface/collectedHeap.hpp"
  30 #include "memory/collectorPolicy.hpp"
  31 #include "memory/generation.hpp"
  32 
  33 class SubTasksDone;
  34 class FlexibleWorkGang;
  35 
  36 // A "GenCollectedHeap" is a CollectedHeap that uses generational
  37 // collection.  It has two generations, young and old.
  38 class GenCollectedHeap : public CollectedHeap {
  39   friend class GenCollectorPolicy;
  40   friend class Generation;
  41   friend class DefNewGeneration;
  42   friend class TenuredGeneration;
  43   friend class ConcurrentMarkSweepGeneration;
  44   friend class CMSCollector;
  45   friend class GenMarkSweep;
  46   friend class VM_GenCollectForAllocation;
  47   friend class VM_GenCollectFull;
  48   friend class VM_GenCollectFullConcurrent;
  49   friend class VM_GC_HeapInspection;
  50   friend class VM_HeapDumper;
  51   friend class HeapInspection;


 498   // Perform a full collection of the first max_level+1 generations.
 499   // This is the low level interface used by the public versions of
 500   // collect() and collect_locked(). Caller holds the Heap_lock on entry.
 501   void collect_locked(GCCause::Cause cause, int max_level);
 502 
 503   // Returns success or failure.
 504   bool create_cms_collector();
 505 
 506   // In support of ExplicitGCInvokesConcurrent functionality
 507   bool should_do_concurrent_full_gc(GCCause::Cause cause);
 508   void collect_mostly_concurrent(GCCause::Cause cause);
 509 
 510   // Save the tops of the spaces in all generations
 511   void record_gen_tops_before_GC() PRODUCT_RETURN;
 512 
 513 protected:
 514   void gc_prologue(bool full);
 515   void gc_epilogue(bool full);
 516 };
 517 
 518 #endif // SHARE_VM_MEMORY_GENCOLLECTEDHEAP_HPP


   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_SHARED_GENCOLLECTEDHEAP_HPP
  26 #define SHARE_VM_GC_SHARED_GENCOLLECTEDHEAP_HPP
  27 
  28 #include "gc/shared/adaptiveSizePolicy.hpp"
  29 #include "gc/shared/collectedHeap.hpp"
  30 #include "gc/shared/collectorPolicy.hpp"
  31 #include "gc/shared/generation.hpp"
  32 
  33 class SubTasksDone;
  34 class FlexibleWorkGang;
  35 
  36 // A "GenCollectedHeap" is a CollectedHeap that uses generational
  37 // collection.  It has two generations, young and old.
  38 class GenCollectedHeap : public CollectedHeap {
  39   friend class GenCollectorPolicy;
  40   friend class Generation;
  41   friend class DefNewGeneration;
  42   friend class TenuredGeneration;
  43   friend class ConcurrentMarkSweepGeneration;
  44   friend class CMSCollector;
  45   friend class GenMarkSweep;
  46   friend class VM_GenCollectForAllocation;
  47   friend class VM_GenCollectFull;
  48   friend class VM_GenCollectFullConcurrent;
  49   friend class VM_GC_HeapInspection;
  50   friend class VM_HeapDumper;
  51   friend class HeapInspection;


 498   // Perform a full collection of the first max_level+1 generations.
 499   // This is the low level interface used by the public versions of
 500   // collect() and collect_locked(). Caller holds the Heap_lock on entry.
 501   void collect_locked(GCCause::Cause cause, int max_level);
 502 
 503   // Returns success or failure.
 504   bool create_cms_collector();
 505 
 506   // In support of ExplicitGCInvokesConcurrent functionality
 507   bool should_do_concurrent_full_gc(GCCause::Cause cause);
 508   void collect_mostly_concurrent(GCCause::Cause cause);
 509 
 510   // Save the tops of the spaces in all generations
 511   void record_gen_tops_before_GC() PRODUCT_RETURN;
 512 
 513 protected:
 514   void gc_prologue(bool full);
 515   void gc_epilogue(bool full);
 516 };
 517 
 518 #endif // SHARE_VM_GC_SHARED_GENCOLLECTEDHEAP_HPP
< prev index next >