comparison agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java @ 1576:4a2e260bb13a

6957882: nsk/sajdi tests failed with NullPointerException Summary: VM.getObjectAlignmentInBytes() accesses intxType before it is created. Reviewed-by: never
author kvn
date Wed, 02 Jun 2010 12:02:49 -0700
parents 2d127394260e
children e9ff18c4ace7
comparison
equal deleted inserted replaced
1575:3657cb01ffc5 1576:4a2e260bb13a
312 312
313 if (debugger != null) { 313 if (debugger != null) {
314 isLP64 = debugger.getMachineDescription().isLP64(); 314 isLP64 = debugger.getMachineDescription().isLP64();
315 } 315 }
316 bytesPerLong = db.lookupIntConstant("BytesPerLong").intValue(); 316 bytesPerLong = db.lookupIntConstant("BytesPerLong").intValue();
317 heapWordSize = db.lookupIntConstant("HeapWordSize").intValue();
318 oopSize = db.lookupIntConstant("oopSize").intValue();
319
320 intxType = db.lookupType("intx");
321 uintxType = db.lookupType("uintx");
322 boolType = (CIntegerType) db.lookupType("bool");
323
317 minObjAlignmentInBytes = getObjectAlignmentInBytes(); 324 minObjAlignmentInBytes = getObjectAlignmentInBytes();
318 if (minObjAlignmentInBytes == 8) { 325 if (minObjAlignmentInBytes == 8) {
319 logMinObjAlignmentInBytes = 3; 326 logMinObjAlignmentInBytes = 3;
320 } else if (minObjAlignmentInBytes == 16) { 327 } else if (minObjAlignmentInBytes == 16) {
321 logMinObjAlignmentInBytes = 4; 328 logMinObjAlignmentInBytes = 4;
322 } else { 329 } else {
323 throw new RuntimeException("Object alignment " + minObjAlignmentInBytes + " not yet supported"); 330 throw new RuntimeException("Object alignment " + minObjAlignmentInBytes + " not yet supported");
324 } 331 }
325
326 heapWordSize = db.lookupIntConstant("HeapWordSize").intValue();
327 oopSize = db.lookupIntConstant("oopSize").intValue();
328
329 intxType = db.lookupType("intx");
330 uintxType = db.lookupType("uintx");
331 boolType = (CIntegerType) db.lookupType("bool");
332 332
333 if (isCompressedOopsEnabled()) { 333 if (isCompressedOopsEnabled()) {
334 // Size info for oops within java objects is fixed 334 // Size info for oops within java objects is fixed
335 heapOopSize = (int)getIntSize(); 335 heapOopSize = (int)getIntSize();
336 } else { 336 } else {