Mercurial > hg > truffle
comparison agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java @ 749:81a249214991
6829234: Refix 6822407 and 6812971
Summary: Fixes two SA issues 6822407 and 6812971
Reviewed-by: swamyv, acorn, kvn, coleenp
author | poonam |
---|---|
date | Mon, 04 May 2009 17:58:10 -0700 |
parents | 23276f80d930 |
children | bd02caa94611 |
comparison
equal
deleted
inserted
replaced
744:af5d39ca39a3 | 749:81a249214991 |
---|---|
316 minObjAlignmentInBytes = db.lookupIntConstant("MinObjAlignmentInBytes").intValue(); | 316 minObjAlignmentInBytes = db.lookupIntConstant("MinObjAlignmentInBytes").intValue(); |
317 // minObjAlignment = db.lookupIntConstant("MinObjAlignment").intValue(); | 317 // minObjAlignment = db.lookupIntConstant("MinObjAlignment").intValue(); |
318 logMinObjAlignmentInBytes = db.lookupIntConstant("LogMinObjAlignmentInBytes").intValue(); | 318 logMinObjAlignmentInBytes = db.lookupIntConstant("LogMinObjAlignmentInBytes").intValue(); |
319 heapWordSize = db.lookupIntConstant("HeapWordSize").intValue(); | 319 heapWordSize = db.lookupIntConstant("HeapWordSize").intValue(); |
320 oopSize = db.lookupIntConstant("oopSize").intValue(); | 320 oopSize = db.lookupIntConstant("oopSize").intValue(); |
321 heapOopSize = db.lookupIntConstant("heapOopSize").intValue(); | |
322 | 321 |
323 intxType = db.lookupType("intx"); | 322 intxType = db.lookupType("intx"); |
324 uintxType = db.lookupType("uintx"); | 323 uintxType = db.lookupType("uintx"); |
325 boolType = (CIntegerType) db.lookupType("bool"); | 324 boolType = (CIntegerType) db.lookupType("bool"); |
325 | |
326 if (isCompressedOopsEnabled()) { | |
327 // Size info for oops within java objects is fixed | |
328 heapOopSize = (int)getIntSize(); | |
329 } else { | |
330 heapOopSize = (int)getOopSize(); | |
331 } | |
326 } | 332 } |
327 | 333 |
328 /** This could be used by a reflective runtime system */ | 334 /** This could be used by a reflective runtime system */ |
329 public static void initialize(TypeDataBase db, boolean isBigEndian) { | 335 public static void initialize(TypeDataBase db, boolean isBigEndian) { |
330 if (soleInstance != null) { | 336 if (soleInstance != null) { |
341 if (soleInstance != null) { | 347 if (soleInstance != null) { |
342 throw new RuntimeException("Attempt to initialize VM twice"); | 348 throw new RuntimeException("Attempt to initialize VM twice"); |
343 } | 349 } |
344 soleInstance = new VM(db, debugger, debugger.getMachineDescription().isBigEndian()); | 350 soleInstance = new VM(db, debugger, debugger.getMachineDescription().isBigEndian()); |
345 | 351 |
352 for (Iterator iter = vmInitializedObservers.iterator(); iter.hasNext(); ) { | |
353 ((Observer) iter.next()).update(null, null); | |
354 } | |
355 | |
346 debugger.putHeapConst(soleInstance.getHeapOopSize(), Universe.getNarrowOopBase(), | 356 debugger.putHeapConst(soleInstance.getHeapOopSize(), Universe.getNarrowOopBase(), |
347 Universe.getNarrowOopShift()); | 357 Universe.getNarrowOopShift()); |
348 | |
349 for (Iterator iter = vmInitializedObservers.iterator(); iter.hasNext(); ) { | |
350 ((Observer) iter.next()).update(null, null); | |
351 } | |
352 | |
353 } | 358 } |
354 | 359 |
355 /** This is used by the debugging system */ | 360 /** This is used by the debugging system */ |
356 public static void shutdown() { | 361 public static void shutdown() { |
357 soleInstance = null; | 362 soleInstance = null; |