< prev index next >

src/share/vm/gc/shared/collectedHeap.hpp

Print this page
rev 12504 : [mq]: whitebox
rev 12506 : [mq]: list_phases

@@ -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.

@@ -577,10 +577,35 @@
   void trace_heap_after_gc(const GCTracer* gc_tracer);
 
   // Heap verification
   virtual void verify(VerifyOption option) = 0;
 
+  // Return true if concurrent phase control (via
+  // request_concurrent_phase_control) is supported by this collector.
+  // The default implementation returns false.
+  virtual bool supports_concurrent_phase_control() const;
+
+  // Return a NULL terminated array of concurrent phase names provided
+  // by this collector.  Supports Whitebox testing.  These are the
+  // names recognized by request_concurrent_phase(). The default
+  // implementation returns an array of one NULL element.
+  virtual const char* const* concurrent_phases() const;
+
+  // Request the collector enter the indicated concurrent phase, and
+  // wait until it does so.  Supports WhiteBox testing.  Only one
+  // request may be active at a time.  Phases are designated by name;
+  // the set of names and their meaning is GC-specific.  Once the
+  // requested phase has been reached, the collector will attempt to
+  // avoid transitioning to a new phase until a new request is made.
+  // [Note: A collector might not be able to remain in a given phase.
+  // For example, a full collection might cancel an in-progress
+  // concurrent collection.]
+  //
+  // Returns true when the phase is reached.  Returns false for an
+  // unknown phase.  The default implementation returns false.
+  virtual bool request_concurrent_phase(const char* phase);
+
   // Non product verification and debugging.
 #ifndef PRODUCT
   // Support for PromotionFailureALot.  Return true if it's time to cause a
   // promotion failure.  The no-argument version uses
   // this->_promotion_failure_alot_count as the counter.
< prev index next >