70 size_t _size;
71 ShenandoahHeap::AllocType _alloc_type;
72 public:
73 ShenandoahAllocTrace(size_t words_size, ShenandoahHeap::AllocType alloc_type);
74 ~ShenandoahAllocTrace();
75 };
76
77 class ShenandoahSafepoint : public AllStatic {
78 public:
79 // check if Shenandoah GC safepoint is in progress
80 static inline bool is_at_shenandoah_safepoint() {
81 if (!SafepointSynchronize::is_at_safepoint()) return false;
82
83 VM_Operation* vm_op = VMThread::vm_operation();
84 if (vm_op == NULL) return false;
85
86 VM_Operation::VMOp_Type type = vm_op->type();
87 return type == VM_Operation::VMOp_ShenandoahInitMark ||
88 type == VM_Operation::VMOp_ShenandoahFinalMarkStartEvac ||
89 type == VM_Operation::VMOp_ShenandoahFinalEvac ||
90 type == VM_Operation::VMOp_ShenandoahInitPartialGC ||
91 type == VM_Operation::VMOp_ShenandoahFinalPartialGC ||
92 type == VM_Operation::VMOp_ShenandoahInitTraversalGC ||
93 type == VM_Operation::VMOp_ShenandoahFinalTraversalGC ||
94 type == VM_Operation::VMOp_ShenandoahInitUpdateRefs ||
95 type == VM_Operation::VMOp_ShenandoahFinalUpdateRefs ||
96 type == VM_Operation::VMOp_ShenandoahFullGC ||
97 type == VM_Operation::VMOp_ShenandoahDegeneratedGC;
98 }
99 };
100
101 #endif // SHARE_VM_GC_SHENANDOAHUTILS_HPP
|
70 size_t _size;
71 ShenandoahHeap::AllocType _alloc_type;
72 public:
73 ShenandoahAllocTrace(size_t words_size, ShenandoahHeap::AllocType alloc_type);
74 ~ShenandoahAllocTrace();
75 };
76
77 class ShenandoahSafepoint : public AllStatic {
78 public:
79 // check if Shenandoah GC safepoint is in progress
80 static inline bool is_at_shenandoah_safepoint() {
81 if (!SafepointSynchronize::is_at_safepoint()) return false;
82
83 VM_Operation* vm_op = VMThread::vm_operation();
84 if (vm_op == NULL) return false;
85
86 VM_Operation::VMOp_Type type = vm_op->type();
87 return type == VM_Operation::VMOp_ShenandoahInitMark ||
88 type == VM_Operation::VMOp_ShenandoahFinalMarkStartEvac ||
89 type == VM_Operation::VMOp_ShenandoahFinalEvac ||
90 type == VM_Operation::VMOp_ShenandoahInitTraversalGC ||
91 type == VM_Operation::VMOp_ShenandoahFinalTraversalGC ||
92 type == VM_Operation::VMOp_ShenandoahInitUpdateRefs ||
93 type == VM_Operation::VMOp_ShenandoahFinalUpdateRefs ||
94 type == VM_Operation::VMOp_ShenandoahFullGC ||
95 type == VM_Operation::VMOp_ShenandoahDegeneratedGC;
96 }
97 };
98
99 #endif // SHARE_VM_GC_SHENANDOAHUTILS_HPP
|