< prev index next >

src/share/vm/gc/shenandoah/vm_operations_shenandoah.hpp

Print this page
rev 13387 : [mq]: parallel_sp_cleaning.patch

@@ -40,11 +40,14 @@
 
 class VM_ShenandoahOperation : public VM_Operation {
 protected:
   uint         _gc_id;
 public:
-  VM_ShenandoahOperation() : _gc_id(GCId::current()) {};
+  bool _safepoint_cleanup_done;
+  VM_ShenandoahOperation() : _gc_id(GCId::current()), _safepoint_cleanup_done(false) {};
+  virtual bool deflates_idle_monitors() { return ShenandoahMergeSafepointCleanup && ! _safepoint_cleanup_done; }
+  virtual bool marks_nmethods() { return ShenandoahMergeSafepointCleanup && ! _safepoint_cleanup_done; }
 };
 
 class VM_ShenandoahReferenceOperation : public VM_ShenandoahOperation {
 public:
   VM_ShenandoahReferenceOperation() : VM_ShenandoahOperation() {};

@@ -90,10 +93,13 @@
 public:
   VM_ShenandoahInitUpdateRefs() : VM_ShenandoahOperation() {};
   VM_Operation::VMOp_Type type() const { return VMOp_ShenandoahInitUpdateRefs; }
   const char* name()             const { return "Shenandoah Init Update References"; }
   virtual void doit();
+  // This is the only Shenandoah VM_Op that cannot take over deflation and nmethod marking.
+  bool deflates_idle_monitors() { return false; }
+  bool marks_nmethods() { return false; }
 };
 
 class VM_ShenandoahFinalUpdateRefs: public VM_ShenandoahOperation {
 public:
   VM_ShenandoahFinalUpdateRefs() : VM_ShenandoahOperation() {};

@@ -106,8 +112,11 @@
 public:
   VM_ShenandoahVerifyHeapAfterEvacuation() : VM_ShenandoahOperation() {};
   VM_Operation::VMOp_Type type() const { return VMOp_ShenandoahVerifyHeapAfterEvacuation; }
   const char* name()             const { return "Shenandoah verify heap after evacuation"; }
   virtual void doit();
+  // We don't care about that here.
+  bool deflates_idle_monitors() { return false; }
+  bool marks_nmethods() { return false; }
 };
 
 #endif //SHARE_VM_GC_SHENANDOAH_VM_OPERATIONS_SHENANDOAH_HPP
< prev index next >