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 @Uninterruptible
025 public final class SimplePhase extends Phase
026 implements Constants {
027 /****************************************************************************
028 * Instance fields
029 */
030
031 /**
032 * Construct a phase given just a name and a global/local ordering
033 * scheme.
034 *
035 * @param name The name of the phase
036 */
037 protected SimplePhase(String name) {
038 super(name);
039 }
040
041 /**
042 * Construct a phase, re-using a specified timer.
043 *
044 * @param name Display name of the phase
045 * @param timer Timer for this phase to contribute to
046 */
047 protected SimplePhase(String name, Timer timer) {
048 super(name, timer);
049 }
050
051 @Override
052 protected void logPhase() {
053 Log.write("SimplePhase(");
054 Log.write(name);
055 Log.write(")");
056 }
057 }