001    /*
002     *  This file is part of the Jikes RVM project (http://jikesrvm.org).
003     *
004     *  This file is licensed to You under the Eclipse Public License (EPL);
005     *  You may not use this file except in compliance with the License. You
006     *  may obtain a copy of the License at
007     *
008     *      http://www.opensource.org/licenses/eclipse-1.0.php
009     *
010     *  See the COPYRIGHT.txt file distributed with this work for information
011     *  regarding copyright ownership.
012     */
013    package org.mmtk.plan;
014    
015    import org.mmtk.utility.Constants;
016    import org.mmtk.utility.statistics.Timer;
017    import org.mmtk.utility.Log;
018    
019    import org.vmmagic.pragma.*;
020    
021    /**
022     * Phases of a garbage collection.
023     *
024     */
025    @Uninterruptible
026    public final class SimplePhase extends Phase
027      implements Constants {
028      /****************************************************************************
029       * Instance fields
030       */
031    
032      /**
033       * Construct a phase given just a name and a global/local ordering
034       * scheme.
035       *
036       * @param name The name of the phase
037       */
038      protected SimplePhase(String name) {
039        super(name);
040      }
041    
042      /**
043       * Construct a phase, re-using a specified timer.
044       *
045       * @param name Display name of the phase
046       * @param timer Timer for this phase to contribute to
047       */
048      protected SimplePhase(String name, Timer timer) {
049        super(name, timer);
050      }
051    
052      /**
053       * Display a phase for debugging purposes.
054       */
055      protected void logPhase() {
056        Log.write("SimplePhase(");
057        Log.write(name);
058        Log.write(")");
059      }
060    }