< prev index next >

src/share/vm/gc/g1/concurrentMarkThread.hpp

Print this page
rev 12505 : imported patch g1_whitebox

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -28,10 +28,11 @@
 #include "gc/shared/concurrentGCThread.hpp"
 
 // The Concurrent Mark GC Thread triggers the parallel G1CMConcurrentMarkingTasks
 // as well as handling various marking cleanup.
 
+class ConcurrentGCPhaseManager;
 class G1ConcurrentMark;
 class G1Policy;
 
 class ConcurrentMarkThread: public ConcurrentGCThread {
   friend class VMStructs;

@@ -48,10 +49,14 @@
     InProgress
   };
 
   volatile State _state;
 
+  // WhiteBox testing support.
+  int _requested_phase;
+  ConcurrentGCPhaseManager* _phase_manager;
+
   void sleepBeforeNextCycle();
   void delay_to_keep_mmu(G1Policy* g1_policy, bool remark);
 
   void run_service();
   void stop_service();

@@ -81,8 +86,13 @@
   // cleared). While during_cycle() is true we will not start another cycle
   // so that cycles do not overlap. We cannot use just in_progress()
   // as the CM thread might take some time to wake up before noticing
   // that started() is set and set in_progress().
   bool during_cycle()      { return !idle(); }
+
+  // WhiteBox testing support.
+  bool request_concurrent_phase(const char* phase);
+
+  ConcurrentGCPhaseManager* phase_manager() const { return _phase_manager; }
 };
 
 #endif // SHARE_VM_GC_G1_CONCURRENTMARKTHREAD_HPP
< prev index next >