25 #define SHARE_VM_GC_SHENANDOAH_VM_OPERATIONS_SHENANDOAH_HPP
26
27 #include "gc/shenandoah/shenandoahConcurrentMark.hpp"
28 #include "gc/shared/vmGCOperations.hpp"
29
30 // VM_operations for the Shenandoah Collector.
31 //
32 // VM_ShenandoahOperation
33 // - VM_ShenandoahInitMark: initiate concurrent marking
34 // - VM_ShenandoahReferenceOperation:
35 // - VM_ShenandoahFinalMarkStartEvac: finish up concurrent marking, and start evacuation
36 // - VM_ShenandoahInitUpdateRefs: initiate update references
37 // - VM_ShenandoahFinalUpdateRefs: finish up update references
38 // - VM_ShenandoahFullGC: do full GC
39 // - VM_ShenandoahPartialGC: do partial GC
40
41 class VM_ShenandoahOperation : public VM_Operation {
42 protected:
43 uint _gc_id;
44 public:
45 VM_ShenandoahOperation() : _gc_id(GCId::current()) {};
46 };
47
48 class VM_ShenandoahReferenceOperation : public VM_ShenandoahOperation {
49 public:
50 VM_ShenandoahReferenceOperation() : VM_ShenandoahOperation() {};
51 bool doit_prologue();
52 void doit_epilogue();
53 };
54
55 class VM_ShenandoahInitMark: public VM_ShenandoahOperation {
56 public:
57 VM_ShenandoahInitMark() : VM_ShenandoahOperation() {};
58 VM_Operation::VMOp_Type type() const { return VMOp_ShenandoahInitMark; }
59 const char* name() const { return "Shenandoah Init Marking"; }
60 virtual void doit();
61 };
62
63 class VM_ShenandoahFinalMarkStartEvac: public VM_ShenandoahReferenceOperation {
64 public:
65 VM_ShenandoahFinalMarkStartEvac() : VM_ShenandoahReferenceOperation() {};
66 VM_Operation::VMOp_Type type() const { return VMOp_ShenandoahFinalMarkStartEvac; }
67 const char* name() const { return "Shenandoah Final Mark and Start Evacuation"; }
68 virtual void doit();
69 };
70
71 class VM_ShenandoahFullGC : public VM_ShenandoahReferenceOperation {
72 private:
73 GCCause::Cause _gc_cause;
74 public:
75 VM_ShenandoahFullGC(GCCause::Cause gc_cause) : VM_ShenandoahReferenceOperation(), _gc_cause(gc_cause) {};
76 VM_Operation::VMOp_Type type() const { return VMOp_ShenandoahFullGC; }
77 const char* name() const { return "Shenandoah Full GC"; }
78 virtual void doit();
79 };
80
81 class VM_ShenandoahPartialGC: public VM_ShenandoahOperation {
82 public:
83 VM_ShenandoahPartialGC() : VM_ShenandoahOperation() {};
84 VM_Operation::VMOp_Type type() const { return VMOp_ShenandoahPartialGC; }
85 const char* name() const { return "Shenandoah Partial Collection"; }
86 virtual void doit();
87 };
88
89 class VM_ShenandoahInitUpdateRefs: public VM_ShenandoahOperation {
90 public:
91 VM_ShenandoahInitUpdateRefs() : VM_ShenandoahOperation() {};
92 VM_Operation::VMOp_Type type() const { return VMOp_ShenandoahInitUpdateRefs; }
93 const char* name() const { return "Shenandoah Init Update References"; }
94 virtual void doit();
95 };
96
97 class VM_ShenandoahFinalUpdateRefs: public VM_ShenandoahOperation {
98 public:
99 VM_ShenandoahFinalUpdateRefs() : VM_ShenandoahOperation() {};
100 VM_Operation::VMOp_Type type() const { return VMOp_ShenandoahFinalUpdateRefs; }
101 const char* name() const { return "Shenandoah Final Update References"; }
102 virtual void doit();
103 };
104
105 class VM_ShenandoahVerifyHeapAfterEvacuation: public VM_ShenandoahOperation {
106 public:
107 VM_ShenandoahVerifyHeapAfterEvacuation() : VM_ShenandoahOperation() {};
108 VM_Operation::VMOp_Type type() const { return VMOp_ShenandoahVerifyHeapAfterEvacuation; }
109 const char* name() const { return "Shenandoah verify heap after evacuation"; }
110 virtual void doit();
111 };
112
113 #endif //SHARE_VM_GC_SHENANDOAH_VM_OPERATIONS_SHENANDOAH_HPP
|
25 #define SHARE_VM_GC_SHENANDOAH_VM_OPERATIONS_SHENANDOAH_HPP
26
27 #include "gc/shenandoah/shenandoahConcurrentMark.hpp"
28 #include "gc/shared/vmGCOperations.hpp"
29
30 // VM_operations for the Shenandoah Collector.
31 //
32 // VM_ShenandoahOperation
33 // - VM_ShenandoahInitMark: initiate concurrent marking
34 // - VM_ShenandoahReferenceOperation:
35 // - VM_ShenandoahFinalMarkStartEvac: finish up concurrent marking, and start evacuation
36 // - VM_ShenandoahInitUpdateRefs: initiate update references
37 // - VM_ShenandoahFinalUpdateRefs: finish up update references
38 // - VM_ShenandoahFullGC: do full GC
39 // - VM_ShenandoahPartialGC: do partial GC
40
41 class VM_ShenandoahOperation : public VM_Operation {
42 protected:
43 uint _gc_id;
44 public:
45 bool _safepoint_cleanup_done;
46 VM_ShenandoahOperation() : _gc_id(GCId::current()), _safepoint_cleanup_done(false) {};
47 };
48
49 class VM_ShenandoahReferenceOperation : public VM_ShenandoahOperation {
50 public:
51 VM_ShenandoahReferenceOperation() : VM_ShenandoahOperation() {};
52 bool doit_prologue();
53 void doit_epilogue();
54 };
55
56 class VM_ShenandoahInitMark: public VM_ShenandoahOperation {
57 public:
58 VM_ShenandoahInitMark() : VM_ShenandoahOperation() {};
59 VM_Operation::VMOp_Type type() const { return VMOp_ShenandoahInitMark; }
60 const char* name() const { return "Shenandoah Init Marking"; }
61 virtual void doit();
62 bool deflates_idle_monitors() { return ShenandoahSPCleanup && ! _safepoint_cleanup_done; }
63 bool marks_nmethods() { return ShenandoahSPCleanup && ! _safepoint_cleanup_done; }
64
65 };
66
67 class VM_ShenandoahFinalMarkStartEvac: public VM_ShenandoahReferenceOperation {
68 public:
69 VM_ShenandoahFinalMarkStartEvac() : VM_ShenandoahReferenceOperation() {};
70 VM_Operation::VMOp_Type type() const { return VMOp_ShenandoahFinalMarkStartEvac; }
71 const char* name() const { return "Shenandoah Final Mark and Start Evacuation"; }
72 virtual void doit();
73 bool deflates_idle_monitors() { return ShenandoahSPCleanup && ! _safepoint_cleanup_done; }
74 bool marks_nmethods() { return ShenandoahSPCleanup && ! _safepoint_cleanup_done; }
75 };
76
77 class VM_ShenandoahFullGC : public VM_ShenandoahReferenceOperation {
78 private:
79 GCCause::Cause _gc_cause;
80 public:
81 VM_ShenandoahFullGC(GCCause::Cause gc_cause) : VM_ShenandoahReferenceOperation(), _gc_cause(gc_cause) {};
82 VM_Operation::VMOp_Type type() const { return VMOp_ShenandoahFullGC; }
83 const char* name() const { return "Shenandoah Full GC"; }
84 virtual void doit();
85 bool deflates_idle_monitors() { return ShenandoahSPCleanup && ! _safepoint_cleanup_done; }
86 bool marks_nmethods() { return ShenandoahSPCleanup && ! _safepoint_cleanup_done; }
87 };
88
89 class VM_ShenandoahPartialGC: public VM_ShenandoahOperation {
90 public:
91 VM_ShenandoahPartialGC() : VM_ShenandoahOperation() {};
92 VM_Operation::VMOp_Type type() const { return VMOp_ShenandoahPartialGC; }
93 const char* name() const { return "Shenandoah Partial Collection"; }
94 virtual void doit();
95 bool deflates_idle_monitors() { return ShenandoahSPCleanup && ! _safepoint_cleanup_done; }
96 bool marks_nmethods() { return ShenandoahSPCleanup && ! _safepoint_cleanup_done; }
97 };
98
99 class VM_ShenandoahInitUpdateRefs: public VM_ShenandoahOperation {
100 public:
101 VM_ShenandoahInitUpdateRefs() : VM_ShenandoahOperation() {};
102 VM_Operation::VMOp_Type type() const { return VMOp_ShenandoahInitUpdateRefs; }
103 const char* name() const { return "Shenandoah Init Update References"; }
104 virtual void doit();
105 };
106
107 class VM_ShenandoahFinalUpdateRefs: public VM_ShenandoahOperation {
108 public:
109 VM_ShenandoahFinalUpdateRefs() : VM_ShenandoahOperation() {};
110 VM_Operation::VMOp_Type type() const { return VMOp_ShenandoahFinalUpdateRefs; }
111 const char* name() const { return "Shenandoah Final Update References"; }
112 virtual void doit();
113 bool deflates_idle_monitors() { return ShenandoahSPCleanup && ! _safepoint_cleanup_done; }
114 bool marks_nmethods() { return ShenandoahSPCleanup && ! _safepoint_cleanup_done; }
115 };
116
117 class VM_ShenandoahVerifyHeapAfterEvacuation: public VM_ShenandoahOperation {
118 public:
119 VM_ShenandoahVerifyHeapAfterEvacuation() : VM_ShenandoahOperation() {};
120 VM_Operation::VMOp_Type type() const { return VMOp_ShenandoahVerifyHeapAfterEvacuation; }
121 const char* name() const { return "Shenandoah verify heap after evacuation"; }
122 virtual void doit();
123 };
124
125 #endif //SHARE_VM_GC_SHENANDOAH_VM_OPERATIONS_SHENANDOAH_HPP
|