< prev index next >
src/hotspot/share/gc/z/zDriver.cpp
Print this page
@@ -31,10 +31,11 @@
#include "gc/z/zHeap.inline.hpp"
#include "gc/z/zMessagePort.inline.hpp"
#include "gc/z/zServiceability.hpp"
#include "gc/z/zStat.hpp"
#include "logging/log.hpp"
+#include "memory/universe.hpp"
#include "runtime/vm_operations.hpp"
#include "runtime/vmThread.hpp"
static const ZStatPhaseCycle ZPhaseCycle("Garbage Collection Cycle");
static const ZStatPhasePause ZPhasePauseMarkStart("Pause Mark Start");
@@ -42,10 +43,11 @@
static const ZStatPhaseConcurrent ZPhaseConcurrentMarkContinue("Concurrent Mark Continue");
static const ZStatPhasePause ZPhasePauseMarkEnd("Pause Mark End");
static const ZStatPhaseConcurrent ZPhaseConcurrentProcessNonStrongReferences("Concurrent Process Non-Strong References");
static const ZStatPhaseConcurrent ZPhaseConcurrentResetRelocationSet("Concurrent Reset Relocation Set");
static const ZStatPhaseConcurrent ZPhaseConcurrentDestroyDetachedPages("Concurrent Destroy Detached Pages");
+static const ZStatPhasePause ZPhasePauseVerify("Pause Verify");
static const ZStatPhaseConcurrent ZPhaseConcurrentSelectRelocationSet("Concurrent Select Relocation Set");
static const ZStatPhaseConcurrent ZPhaseConcurrentPrepareRelocationSet("Concurrent Prepare Relocation Set");
static const ZStatPhasePause ZPhasePauseRelocateStart("Pause Relocate Start");
static const ZStatPhaseConcurrent ZPhaseConcurrentRelocated("Concurrent Relocate");
static const ZStatCriticalPhase ZCriticalPhaseGCLockerStall("GC Locker Stall", false /* verbose */);
@@ -208,10 +210,23 @@
return ZHeap::heap()->mark_end();
}
};
+class ZVerifyClosure : public ZOperationClosure {
+public:
+ virtual const char* name() const {
+ return "ZVerify";
+ }
+
+ virtual bool do_operation() {
+ ZStatTimer timer(ZPhasePauseVerify);
+ Universe::verify();
+ return true;
+ }
+};
+
class ZRelocateStartClosure : public ZOperationClosure {
public:
virtual const char* name() const {
return "ZRelocateStart";
}
@@ -365,29 +380,35 @@
{
ZStatTimer timer(ZPhaseConcurrentDestroyDetachedPages);
ZHeap::heap()->destroy_detached_pages();
}
- // Phase 7: Concurrent Select Relocation Set
+ // Phase 7: Pause Verify
+ if (VerifyBeforeGC || VerifyDuringGC || VerifyAfterGC) {
+ ZVerifyClosure cl;
+ vm_operation(&cl);
+ }
+
+ // Phase 8: Concurrent Select Relocation Set
{
ZStatTimer timer(ZPhaseConcurrentSelectRelocationSet);
ZHeap::heap()->select_relocation_set();
}
- // Phase 8: Concurrent Prepare Relocation Set
+ // Phase 9: Concurrent Prepare Relocation Set
{
ZStatTimer timer(ZPhaseConcurrentPrepareRelocationSet);
ZHeap::heap()->prepare_relocation_set();
}
- // Phase 9: Pause Relocate Start
+ // Phase 10: Pause Relocate Start
{
ZRelocateStartClosure cl;
vm_operation(&cl);
}
- // Phase 10: Concurrent Relocate
+ // Phase 11: Concurrent Relocate
{
ZStatTimer timer(ZPhaseConcurrentRelocated);
ZHeap::heap()->relocate();
}
}
< prev index next >