< prev index next >

src/hotspot/share/gc/shared/collectedHeap.hpp

Print this page
rev 56464 : 8231707: Improve Mutex inlining
Contributed-by: robbin.ehn@oracle.com, claes.redestad@oracle.com


  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_GC_SHARED_COLLECTEDHEAP_HPP
  26 #define SHARE_GC_SHARED_COLLECTEDHEAP_HPP
  27 
  28 #include "gc/shared/gcCause.hpp"
  29 #include "gc/shared/gcWhen.hpp"
  30 #include "gc/shared/verifyOption.hpp"
  31 #include "memory/allocation.hpp"
  32 #include "runtime/handles.hpp"
  33 #include "runtime/perfData.hpp"
  34 #include "runtime/safepoint.hpp"
  35 #include "services/memoryUsage.hpp"
  36 #include "utilities/debug.hpp"
  37 #include "utilities/events.hpp"
  38 #include "utilities/formatBuffer.hpp"
  39 #include "utilities/growableArray.hpp"
  40 
  41 // A "CollectedHeap" is an implementation of a java heap for HotSpot.  This
  42 // is an abstract class: there may be many different kinds of heaps.  This
  43 // class defines the functions that a heap must implement, and contains
  44 // infrastructure common to all heaps.
  45 
  46 class AdaptiveSizePolicy;
  47 class BarrierSet;
  48 class GCHeapSummary;
  49 class GCTimer;
  50 class GCTracer;
  51 class GCMemoryManager;
  52 class MemoryPool;
  53 class MetaspaceSummary;
  54 class ReservedHeapSpace;
  55 class SoftRefPolicy;
  56 class Thread;
  57 class ThreadClosure;
  58 class VirtualSpaceSummary;
  59 class WorkGang;
  60 class nmethod;
  61 
  62 class GCMessage : public FormatBuffer<1024> {
  63  public:
  64   bool is_before;
  65 
  66  public:
  67   GCMessage() {}
  68 };
  69 
  70 class CollectedHeap;
  71 
  72 class GCHeapLog : public EventLogBase<GCMessage> {
  73  private:
  74   void log_heap(CollectedHeap* heap, bool before);
  75 
  76  public:
  77   GCHeapLog() : EventLogBase<GCMessage>("GC Heap History", "gc") {}
  78 
  79   void log_heap_before(CollectedHeap* heap) {
  80     log_heap(heap, true);
  81   }
  82   void log_heap_after(CollectedHeap* heap) {
  83     log_heap(heap, false);
  84   }
  85 };
  86 
  87 //
  88 // CollectedHeap
  89 //   GenCollectedHeap
  90 //     SerialHeap
  91 //     CMSHeap
  92 //   G1CollectedHeap
  93 //   ParallelScavengeHeap
  94 //   ShenandoahHeap
  95 //   ZCollectedHeap
  96 //
  97 class CollectedHeap : public CHeapObj<mtInternal> {
  98   friend class VMStructs;
  99   friend class JVMCIVMStructs;
 100   friend class IsGCActiveMark; // Block structured external access to _is_gc_active
 101   friend class MemAllocator;
 102 
 103  private:
 104   GCHeapLog* _gc_heap_log;
 105 




  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_GC_SHARED_COLLECTEDHEAP_HPP
  26 #define SHARE_GC_SHARED_COLLECTEDHEAP_HPP
  27 
  28 #include "gc/shared/gcCause.hpp"
  29 #include "gc/shared/gcWhen.hpp"
  30 #include "gc/shared/verifyOption.hpp"
  31 #include "memory/allocation.hpp"
  32 #include "runtime/handles.hpp"
  33 #include "runtime/perfData.hpp"
  34 #include "runtime/safepoint.hpp"
  35 #include "services/memoryUsage.hpp"
  36 #include "utilities/debug.hpp"

  37 #include "utilities/formatBuffer.hpp"
  38 #include "utilities/growableArray.hpp"
  39 
  40 // A "CollectedHeap" is an implementation of a java heap for HotSpot.  This
  41 // is an abstract class: there may be many different kinds of heaps.  This
  42 // class defines the functions that a heap must implement, and contains
  43 // infrastructure common to all heaps.
  44 
  45 class AdaptiveSizePolicy;
  46 class BarrierSet;
  47 class GCHeapSummary;
  48 class GCTimer;
  49 class GCTracer;
  50 class GCMemoryManager;
  51 class MemoryPool;
  52 class MetaspaceSummary;
  53 class ReservedHeapSpace;
  54 class SoftRefPolicy;
  55 class Thread;
  56 class ThreadClosure;
  57 class VirtualSpaceSummary;
  58 class WorkGang;
  59 class nmethod;
  60 
  61 class GCMessage : public FormatBuffer<1024> {
  62  public:
  63   bool is_before;
  64 
  65  public:
  66   GCMessage() {}
  67 };
  68 
  69 class CollectedHeap;
  70 class GCHeapLog;














  71 
  72 //
  73 // CollectedHeap
  74 //   GenCollectedHeap
  75 //     SerialHeap
  76 //     CMSHeap
  77 //   G1CollectedHeap
  78 //   ParallelScavengeHeap
  79 //   ShenandoahHeap
  80 //   ZCollectedHeap
  81 //
  82 class CollectedHeap : public CHeapObj<mtInternal> {
  83   friend class VMStructs;
  84   friend class JVMCIVMStructs;
  85   friend class IsGCActiveMark; // Block structured external access to _is_gc_active
  86   friend class MemAllocator;
  87 
  88  private:
  89   GCHeapLog* _gc_heap_log;
  90 


< prev index next >