comparison agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java @ 650:54782a4cd321

6812971: SA: re-attaching to process fails Summary: After attaching, de-attaching SA from a process, the second time attach() call fails. This happens because in VM.initialize(), Universe does not get re-initialized before it is accessed. Reviewed-by: swamyv
author poonam
date Sun, 15 Mar 2009 18:11:46 -0700
parents cecd8eb4e0ca
children 60bfce711da4
comparison
equal deleted inserted replaced
614:3db67f76d308 650:54782a4cd321
340 public static void initialize(TypeDataBase db, JVMDebugger debugger) { 340 public static void initialize(TypeDataBase db, JVMDebugger debugger) {
341 if (soleInstance != null) { 341 if (soleInstance != null) {
342 throw new RuntimeException("Attempt to initialize VM twice"); 342 throw new RuntimeException("Attempt to initialize VM twice");
343 } 343 }
344 soleInstance = new VM(db, debugger, debugger.getMachineDescription().isBigEndian()); 344 soleInstance = new VM(db, debugger, debugger.getMachineDescription().isBigEndian());
345 debugger.putHeapConst(Universe.getHeapBase(), soleInstance.getHeapOopSize(), 345
346 soleInstance.logMinObjAlignmentInBytes);
347 for (Iterator iter = vmInitializedObservers.iterator(); iter.hasNext(); ) { 346 for (Iterator iter = vmInitializedObservers.iterator(); iter.hasNext(); ) {
348 ((Observer) iter.next()).update(null, null); 347 ((Observer) iter.next()).update(null, null);
349 } 348 }
349
350 debugger.putHeapConst(Universe.getHeapBase(), soleInstance.getHeapOopSize(),
351 soleInstance.logMinObjAlignmentInBytes);
350 } 352 }
351 353
352 /** This is used by the debugging system */ 354 /** This is used by the debugging system */
353 public static void shutdown() { 355 public static void shutdown() {
354 soleInstance = null; 356 soleInstance = null;