test/lib/sun/hotspot/WhiteBox.java
changeset 46205 177c44a71273
parent 46194 5596e6f63072
child 46209 2ca4b9abe9b6
equal deleted inserted replaced
46204:391820b70bd1 46205:177c44a71273
   387   // Force Young GC
   387   // Force Young GC
   388   public native void youngGC();
   388   public native void youngGC();
   389 
   389 
   390   // Force Full GC
   390   // Force Full GC
   391   public native void fullGC();
   391   public native void fullGC();
       
   392 
       
   393   // Returns true if the current GC supports control of its concurrent
       
   394   // phase via requestConcurrentGCPhase().  If false, a request will
       
   395   // always fail.
       
   396   public native boolean supportsConcurrentGCPhaseControl();
       
   397 
       
   398   // Returns an array of concurrent phase names provided by this
       
   399   // collector.  These are the names recognized by
       
   400   // requestConcurrentGCPhase().
       
   401   public native String[] getConcurrentGCPhases();
       
   402 
       
   403   // Attempt to put the collector into the indicated concurrent phase,
       
   404   // and attempt to remain in that state until a new request is made.
       
   405   //
       
   406   // Returns immediately if already in the requested phase.
       
   407   // Otherwise, waits until the phase is reached.
       
   408   //
       
   409   // Throws IllegalStateException if unsupported by the current collector.
       
   410   // Throws NullPointerException if phase is null.
       
   411   // Throws IllegalArgumentException if phase is not valid for the current collector.
       
   412   public void requestConcurrentGCPhase(String phase) {
       
   413     if (!supportsConcurrentGCPhaseControl()) {
       
   414       throw new IllegalStateException("Concurrent GC phase control not supported");
       
   415     } else if (phase == null) {
       
   416       throw new NullPointerException("null phase");
       
   417     } else if (!requestConcurrentGCPhase0(phase)) {
       
   418       throw new IllegalArgumentException("Unknown concurrent GC phase: " + phase);
       
   419     }
       
   420   }
       
   421 
       
   422   // Helper for requestConcurrentGCPhase().  Returns true if request
       
   423   // succeeded, false if the phase is invalid.
       
   424   private native boolean requestConcurrentGCPhase0(String phase);
   392 
   425 
   393   // Method tries to start concurrent mark cycle.
   426   // Method tries to start concurrent mark cycle.
   394   // It returns false if CM Thread is always in concurrent cycle.
   427   // It returns false if CM Thread is always in concurrent cycle.
   395   public native boolean g1StartConcMarkCycle();
   428   public native boolean g1StartConcMarkCycle();
   396 
   429