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 */
013package org.jikesrvm;
014
015import org.vmmagic.pragma.RuntimeFinal;
016
017/**
018 * Flags that control the behavior of our virtual machine.<p>
019 *
020 * Typically these are properties that can be set from the command line
021 * (and thus are NOT final).  All final properties should be
022 * declared in Configuration
023 */
024public class Properties extends Options {
025
026  // The VM class hierarchy is used in three ways:
027  //    - by boot image writer to create an executable VM image
028  //    - by tools that wish use VM classes for generic java programming
029  //    - by VM image itself, at execution time
030  // The following flags specify which behavior is desired.
031  //
032
033  /**
034   * use classes for boot image generation? (see BootImageWriter)
035   */
036  @RuntimeFinal(false)
037  public static boolean writingBootImage;
038  /**
039   * use classes for generic java programming?
040   */
041  @RuntimeFinal(false)
042  public static boolean runningTool;
043  /**
044   * use classes for running actual VM?
045   */
046  @RuntimeFinal(true)
047  public static boolean runningVM;
048  /**
049   * are we in the boot-image-writing portion of boot-image-creation
050   */
051  @RuntimeFinal(false)
052  public static boolean writingImage = false;
053  /**
054   * is the running VM fully booted?
055   * Set by VM.boot when the VM is fully booted.
056   */
057  public static boolean fullyBooted = false;
058
059  /**
060   * Is it safe to create a java.lang.Thread now?  Set by VM.boot at the
061   * appropriate time.
062   */
063  public static boolean safeToAllocateJavaThread = false;
064
065  /**
066   * The following is set on by -X:verboseBoot= command line argument.
067   * When true, it generates messages to the sysWrite stream summarizing
068   * progress during the execution of VM.boot
069   */
070  public static int verboseBoot = 0;
071
072  /**
073   * The following is set on by -X:verboseSignalHandling command line argument.
074   * When {@code true}, it generates messages to the sysWrite stream when
075   * a hardware exception is delivered to a thread.
076   */
077  public static boolean verboseSignalHandling = false;
078
079  /**
080   * The following is set on by -verbose:class command line argument.
081   * When true, it generates messages to the sysWrite stream summarizing
082   * class loading activities
083   */
084  public static boolean verboseClassLoading = false;
085
086  /**
087   * The following is set on by -verbose:jni command line argument.
088   * When true, it generates messages to the sysWrite stream summarizing
089   * JNI activities
090   */
091  public static boolean verboseJNI = false;
092
093  // Runtime subsystem tracing.
094  //
095  public static final boolean TraceDictionaries = false;
096  public static final boolean TraceStatics = false;
097  public static final boolean TraceFileSystem = false;
098  public static final boolean TraceThreads = false;
099  public static final boolean TraceStackTrace = false;
100  public static final boolean TraceExceptionDelivery = false;
101
102  // Baseline compiler reference map tracing.
103  //
104  public static final boolean TraceStkMaps = false;
105  public static final boolean ReferenceMapsStatistics = false;
106  public static final boolean ReferenceMapsBitStatistics = false;
107
108  public static final boolean TraceOnStackReplacement = false;
109
110  /** How much farther? */
111  public static final int maxSystemTroubleRecursionDepthBeforeWeStopVMSysWrite = 3;
112}