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.jikesrvm; 014 015 /** 016 * Flags that specify the configuration of our virtual machine. 017 * 018 * Note: Changing any <code>final</code> flags requires that the whole vm 019 * be recompiled and rebuilt after their values are changed. 020 */ 021 public abstract class Configuration { 022 023 //TODO: Split target specific configuration into separate file 024 public static final org.jikesrvm.ia32.MachineSpecificIA.IA32 archHelper = org.jikesrvm.ia32.MachineSpecificIA.IA32.singleton; 025 026 public static final boolean BuildForPowerPC = false; 027 public static final boolean BuildForIA32 = !BuildForPowerPC; 028 public static final boolean BuildForSSE2 = BuildForIA32 && true; 029 public static final boolean BuildForSSE2Full = BuildForSSE2 && true; 030 public static final boolean BuildForHwFsqrt = true && (false || VM.BuildForSSE2); 031 032 public static final boolean BuildFor32Addr = true; 033 public static final boolean BuildFor64Addr = !BuildFor32Addr; 034 035 public static final boolean BuildForAix = false; 036 public static final boolean BuildForLinux = true; 037 public static final boolean BuildForSolaris = false; 038 public static final boolean BuildForOsx = !BuildForAix && !BuildForLinux && !BuildForSolaris; 039 040 public static final boolean BuildForGnuClasspath = true; 041 public static final boolean BuildForHarmony = false; 042 043 public static final boolean LittleEndian = BuildForIA32; 044 045 /* ABI selection. Exactly one of these variables will be true in each build. */ 046 public static final boolean BuildForMachOABI = BuildForOsx; 047 public static final boolean BuildForPowerOpenABI = BuildForAix || (BuildForLinux && BuildForPowerPC && BuildFor64Addr); 048 public static final boolean BuildForSVR4ABI = !(BuildForPowerOpenABI || BuildForMachOABI); 049 050 /** Are we using Classpath's portable native sync feature? */ 051 public static final boolean PortableNativeSync = true; 052 053 /** 054 * Can a dereference of a null pointer result in an access 055 * to 'low' memory addresses that must be explicitly guarded because the 056 * target OS doesn't allow us to read protect low memory? 057 */ 058 public static final boolean ExplicitlyGuardLowMemory = BuildForAix; 059 060 /** Assertion checking. 061 <dl> 062 <dt>false</dt> <dd> no assertion checking at runtime</dd> 063 <dt>true </dt> <dd> execute assertion checks at runtime</dd> 064 <dl> 065 066 Note: code your assertion checks as 067 <pre> 068 if (VM.VerifyAssertions) 069 VM._assert(xxx); 070 </pre> 071 */ 072 public static final boolean VerifyAssertions = true; 073 public static final boolean ExtremeAssertions = false; 074 075 /** 076 * If set, verify that Uninterruptible methods actually cannot be 077 * interrupted. 078 */ 079 public static final boolean VerifyUnint = VerifyAssertions; 080 081 /** If set, ignore the supression pragma and print all warning messages. */ 082 public static final boolean ParanoidVerifyUnint = false; 083 084 /** Is this an adaptive build? */ 085 public static final boolean BuildForAdaptiveSystem = true; 086 087 /** Is this an opt compiler build? */ 088 public static final boolean BuildForOptCompiler = true; 089 090 /** build with Base boot image compiler? */ 091 public static final boolean BuildWithBaseBootImageCompiler = true; 092 093 // Interface method dispatch strategy. 094 // We either use IMT's (Alpern, Cocchi, Fink, Grove, and Lieber OOPSLA 2001) 095 // or searched ITables. See also the research archive for the variants on these 096 // two schemes that were evaluated in the OOPSLA 2001 paper. 097 public static final boolean BuildForIMTInterfaceInvocation = true; 098 public static final boolean BuildForITableInterfaceInvocation = !BuildForIMTInterfaceInvocation; 099 100 /** Epilogue yieldpoints increase sampling accuracy for adaptive 101 recompilation. In particular, they are key for large, leaf, loop-free 102 methods. */ 103 public static final boolean UseEpilogueYieldPoints = BuildForAdaptiveSystem; 104 105 /** NUmber of allocations between gc's during stress testing. Set to 0 to disable. */ 106 public static final int StressGCAllocationInterval = 0; 107 public static final boolean ForceFrequentGC = 0 != StressGCAllocationInterval; 108 109 public static final boolean BuildWithGCTrace = false; 110 public static final boolean BuildWithGCSpy = false; 111 112 public static final String RVM_VERSION_STRING = "Jikes RVM 3.1.3+hg (r20b92f3296178d07928c03caf46201760c2c2a06)"; 113 public static final String RVM_CONFIGURATION = "prototype-opt"; 114 115 /** 116 * Alignment checking (for IA32 only; for debugging purposes only). 117 * To enable, build with -Dconfig.alignment-checking=true. 118 * Important: You'll also need to build without SSE (-Dtarget.arch.sse2=none) and 119 * run Jikes with only one processor. 120 */ 121 public static final boolean AlignmentChecking = false; 122 }