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.vm;
014    
015    import org.mmtk.utility.Log;
016    import org.mmtk.utility.statistics.Xml;
017    
018    public class Config {
019      /** The name of the active plan */
020      private final String ACTIVE_PLAN;
021    
022      /** Mark bit in the header or on the side ? */
023      public final boolean HEADER_MARK_BITS;
024    
025      Config(BuildTimeConfig config) {
026        ACTIVE_PLAN            = config.getPlanName();
027        HEADER_MARK_BITS        = config.getBooleanProperty("mmtk.headerMarkBit",true);
028      }
029    
030      public void printConfig() {
031        Log.writeln("================ MMTk Configuration ================");
032        Log.write("plan = "); Log.writeln(ACTIVE_PLAN);
033        Log.write("HEADER_MARK_BITS = ");  Log.writeln(HEADER_MARK_BITS);
034        Log.writeln("====================================================");
035      }
036    
037      public void printConfigXml() {
038        Log.writeln("<config>");
039        Xml.configItem("plan",ACTIVE_PLAN);
040        Xml.configItem("header-mark-bit",HEADER_MARK_BITS);
041        Log.writeln("</config>");
042      }
043    }