src/hotspot/share/gc/z/zDriver.cpp
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 55002 da9840e2f7da
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
    29 #include "gc/z/zDriver.hpp"
    29 #include "gc/z/zDriver.hpp"
    30 #include "gc/z/zHeap.inline.hpp"
    30 #include "gc/z/zHeap.inline.hpp"
    31 #include "gc/z/zMessagePort.inline.hpp"
    31 #include "gc/z/zMessagePort.inline.hpp"
    32 #include "gc/z/zServiceability.hpp"
    32 #include "gc/z/zServiceability.hpp"
    33 #include "gc/z/zStat.hpp"
    33 #include "gc/z/zStat.hpp"
       
    34 #include "gc/z/zVerify.hpp"
    34 #include "logging/log.hpp"
    35 #include "logging/log.hpp"
    35 #include "memory/universe.hpp"
    36 #include "memory/universe.hpp"
    36 #include "runtime/vmOperations.hpp"
    37 #include "runtime/vmOperations.hpp"
    37 #include "runtime/vmThread.hpp"
    38 #include "runtime/vmThread.hpp"
    38 
    39 
    84 
    85 
    85     // Setup GC id and active marker
    86     // Setup GC id and active marker
    86     GCIdMark gc_id_mark(_gc_id);
    87     GCIdMark gc_id_mark(_gc_id);
    87     IsGCActiveMark gc_active_mark;
    88     IsGCActiveMark gc_active_mark;
    88 
    89 
       
    90     // Verify before operation
       
    91     ZVerify::before_zoperation();
       
    92 
    89     // Execute operation
    93     // Execute operation
    90     _success = do_operation();
    94     _success = do_operation();
    91 
    95 
    92     // Update statistics
    96     // Update statistics
    93     ZStatSample(ZSamplerJavaThreads, Threads::number_of_threads());
    97     ZStatSample(ZSamplerJavaThreads, Threads::number_of_threads());
   202   virtual bool do_operation() {
   206   virtual bool do_operation() {
   203     ZStatTimer timer(ZPhasePauseRelocateStart);
   207     ZStatTimer timer(ZPhasePauseRelocateStart);
   204     ZServiceabilityRelocateStartTracer tracer;
   208     ZServiceabilityRelocateStartTracer tracer;
   205     ZHeap::heap()->relocate_start();
   209     ZHeap::heap()->relocate_start();
   206     return true;
   210     return true;
       
   211   }
       
   212 };
       
   213 
       
   214 class VM_ZVerify : public VM_Operation {
       
   215 public:
       
   216   virtual VMOp_Type type() const {
       
   217     return VMOp_ZVerify;
       
   218   }
       
   219 
       
   220   virtual void doit() {
       
   221     ZVerify::after_weak_processing();
   207   }
   222   }
   208 };
   223 };
   209 
   224 
   210 ZDriver::ZDriver() :
   225 ZDriver::ZDriver() :
   211     _gc_cycle_port(),
   226     _gc_cycle_port(),
   299   ZHeap::heap()->reset_relocation_set();
   314   ZHeap::heap()->reset_relocation_set();
   300 }
   315 }
   301 
   316 
   302 void ZDriver::pause_verify() {
   317 void ZDriver::pause_verify() {
   303   if (VerifyBeforeGC || VerifyDuringGC || VerifyAfterGC) {
   318   if (VerifyBeforeGC || VerifyDuringGC || VerifyAfterGC) {
       
   319     // Full verification
   304     VM_Verify op;
   320     VM_Verify op;
       
   321     VMThread::execute(&op);
       
   322   } else if (ZVerifyRoots || ZVerifyObjects) {
       
   323     // Limited verification
       
   324     VM_ZVerify op;
   305     VMThread::execute(&op);
   325     VMThread::execute(&op);
   306   }
   326   }
   307 }
   327 }
   308 
   328 
   309 void ZDriver::concurrent_select_relocation_set() {
   329 void ZDriver::concurrent_select_relocation_set() {