agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
Print this page
@@ -244,26 +244,26 @@
"using incompatible version of SA and you may see unexpected " +
"results.");
}
}
- private static final boolean disableDerivedPrinterTableCheck;
+ private static final boolean disableDerivedPointerTableCheck;
private static final Properties saProps;
static {
saProps = new Properties();
URL url = null;
try {
url = VM.class.getClassLoader().getResource("sa.properties");
saProps.load(new BufferedInputStream(url.openStream()));
} catch (Exception e) {
- throw new RuntimeException("Unable to load properties " +
+ System.err.println("Unable to load properties " +
(url == null ? "null" : url.toString()) +
": " + e.getMessage());
}
- disableDerivedPrinterTableCheck = System.getProperty("sun.jvm.hotspot.runtime.VM.disableDerivedPointerTableCheck") != null;
+ disableDerivedPointerTableCheck = System.getProperty("sun.jvm.hotspot.runtime.VM.disableDerivedPointerTableCheck") != null;
}
private VM(TypeDataBase db, JVMDebugger debugger, boolean isBigEndian) {
this.db = db;
this.debugger = debugger;
@@ -369,11 +369,12 @@
}
/** This is used by the debugging system */
public static void initialize(TypeDataBase db, JVMDebugger debugger) {
if (soleInstance != null) {
- throw new RuntimeException("Attempt to initialize VM twice");
+ // Using multiple SA Tool classes in the same process creates a call here.
+ return;
}
soleInstance = new VM(db, debugger, debugger.getMachineDescription().isBigEndian());
for (Iterator iter = vmInitializedObservers.iterator(); iter.hasNext(); ) {
((Observer) iter.next()).update(null, null);
@@ -681,11 +682,11 @@
return usingServerCompiler;
}
/** Returns true if C2 derived pointer table should be used, false otherwise */
public boolean useDerivedPointerTable() {
- return !disableDerivedPrinterTableCheck;
+ return !disableDerivedPointerTableCheck;
}
/** Returns the code cache; should not be used if is core build */
public CodeCache getCodeCache() {
if (Assert.ASSERTS_ENABLED) {