< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp

Print this page
rev 57589 : 8237632: Shenandoah fails some vmTestbase_nsk_jvmti tests with "Forwardee must point to a heap address"


  79   const GCIdMark                _gc_id_mark;
  80   const SvcGCMarker             _svc_gc_mark;
  81   const IsGCActiveMark          _is_gc_active_mark;
  82   TraceMemoryManagerStats       _trace_pause;
  83 
  84 public:
  85   ShenandoahGCPauseMark(uint gc_id, SvcGCMarker::reason_type type);
  86   ~ShenandoahGCPauseMark();
  87 };
  88 
  89 class ShenandoahAllocTrace : public StackObj {
  90 private:
  91   double _start;
  92   size_t _size;
  93   ShenandoahAllocRequest::Type _alloc_type;
  94 public:
  95   ShenandoahAllocTrace(size_t words_size, ShenandoahAllocRequest::Type alloc_type);
  96   ~ShenandoahAllocTrace();
  97 };
  98 
  99 class ShenandoahSafepoint : public AllStatic {
 100 public:
 101   // check if Shenandoah GC safepoint is in progress
 102   static inline bool is_at_shenandoah_safepoint() {
 103     if (!SafepointSynchronize::is_at_safepoint()) return false;
 104 
 105     VM_Operation* vm_op = VMThread::vm_operation();
 106     if (vm_op == NULL) return false;
 107 
 108     VM_Operation::VMOp_Type type = vm_op->type();
 109     return type == VM_Operation::VMOp_ShenandoahInitMark ||
 110            type == VM_Operation::VMOp_ShenandoahFinalMarkStartEvac ||
 111            type == VM_Operation::VMOp_ShenandoahFinalEvac ||
 112            type == VM_Operation::VMOp_ShenandoahInitTraversalGC ||
 113            type == VM_Operation::VMOp_ShenandoahFinalTraversalGC ||
 114            type == VM_Operation::VMOp_ShenandoahInitUpdateRefs ||
 115            type == VM_Operation::VMOp_ShenandoahFinalUpdateRefs ||
 116            type == VM_Operation::VMOp_ShenandoahFullGC ||
 117            type == VM_Operation::VMOp_ShenandoahDegeneratedGC;
 118   }
 119 };
 120 
 121 class ShenandoahWorkerSession : public StackObj {
 122 protected:
 123   uint _worker_id;
 124 
 125   ShenandoahWorkerSession(uint worker_id);
 126   ~ShenandoahWorkerSession();
 127 public:
 128   static inline uint worker_id() {
 129     Thread* thr = Thread::current();
 130     uint id = ShenandoahThreadLocalData::worker_id(thr);
 131     assert(id != ShenandoahThreadLocalData::INVALID_WORKER_ID, "Worker session has not been created");
 132     return id;
 133   }
 134 };
 135 
 136 class ShenandoahConcurrentWorkerSession : public ShenandoahWorkerSession {
 137 private:
 138   EventGCPhaseConcurrent _event;
 139 
 140 public:




  79   const GCIdMark                _gc_id_mark;
  80   const SvcGCMarker             _svc_gc_mark;
  81   const IsGCActiveMark          _is_gc_active_mark;
  82   TraceMemoryManagerStats       _trace_pause;
  83 
  84 public:
  85   ShenandoahGCPauseMark(uint gc_id, SvcGCMarker::reason_type type);
  86   ~ShenandoahGCPauseMark();
  87 };
  88 
  89 class ShenandoahAllocTrace : public StackObj {
  90 private:
  91   double _start;
  92   size_t _size;
  93   ShenandoahAllocRequest::Type _alloc_type;
  94 public:
  95   ShenandoahAllocTrace(size_t words_size, ShenandoahAllocRequest::Type alloc_type);
  96   ~ShenandoahAllocTrace();
  97 };
  98 






















  99 class ShenandoahWorkerSession : public StackObj {
 100 protected:
 101   uint _worker_id;
 102 
 103   ShenandoahWorkerSession(uint worker_id);
 104   ~ShenandoahWorkerSession();
 105 public:
 106   static inline uint worker_id() {
 107     Thread* thr = Thread::current();
 108     uint id = ShenandoahThreadLocalData::worker_id(thr);
 109     assert(id != ShenandoahThreadLocalData::INVALID_WORKER_ID, "Worker session has not been created");
 110     return id;
 111   }
 112 };
 113 
 114 class ShenandoahConcurrentWorkerSession : public ShenandoahWorkerSession {
 115 private:
 116   EventGCPhaseConcurrent _event;
 117 
 118 public:


< prev index next >