use of com.ibm.j9ddr.vm29.pointer.U8Pointer in project openj9 by eclipse.
the class GCCardTable method cleanRange.
public void cleanRange(U8Pointer lowCard, U8Pointer highCard, GCCardCleaner cardCleaner) throws CorruptDataException {
U8Pointer thisCard = lowCard;
U8Pointer endCard = highCard;
while (thisCard.lt(endCard)) {
try {
U8 card = thisCard.at(0);
if (!card.eq(J9ModroncoreConstants.CARD_CLEAN)) {
VoidPointer lowAddress = cardAddrToHeapAddr(thisCard);
VoidPointer highAddress = lowAddress.addOffset(J9ModroncoreConstants.CARD_SIZE);
cardCleaner.clean(lowAddress, highAddress, thisCard);
}
} catch (CorruptDataException cde) {
raiseCorruptDataEvent("Corrupt Card", cde, false);
}
thisCard = thisCard.add(1);
}
}
use of com.ibm.j9ddr.vm29.pointer.U8Pointer in project openj9 by eclipse.
the class GCObjectHeapIteratorAddressOrderedList_V1 method advance.
@Override
public void advance(UDATA size) {
U8Pointer newAddress = scanPtr.addOffset(size);
if (newAddress.gte(scanPtr) && newAddress.lt(scanPtrTop)) {
scanPtr = newAddress;
currentObject = null;
} else {
throw new NoSuchElementException("An address to advance is out of range");
}
}
use of com.ibm.j9ddr.vm29.pointer.U8Pointer in project openj9 by eclipse.
the class J9ClassHelper method getMethodFromPCAndClass.
/*
* Returns a program space pointer to the matching J9Method for the
* specified class and PC.
*/
public static J9MethodPointer getMethodFromPCAndClass(J9ClassPointer localClass, U8Pointer pc) throws CorruptDataException {
J9ROMClassPointer localROMClass = localClass.romClass();
for (int i = 0; i < localROMClass.romMethodCount().longValue(); i++) {
J9MethodPointer localMethod = localClass.ramMethods().add(i);
J9ROMMethodPointer romMethod = J9MethodHelper.romMethod(localMethod);
boolean a = pc.gte(U8Pointer.cast(romMethod));
boolean b = pc.lte(J9ROMMethodHelper.bytecodeEnd(romMethod).subOffset(1));
if (a && b) {
return localMethod;
}
}
return J9MethodPointer.NULL;
}
use of com.ibm.j9ddr.vm29.pointer.U8Pointer in project openj9 by eclipse.
the class RamClassWalker method allSlotsInExtendedMethodBlockDo.
private void allSlotsInExtendedMethodBlockDo() throws CorruptDataException {
final J9JavaVMPointer vm = J9RASHelper.getVM(DataType.getJ9RASPointer());
/* add in size of method trace array if extended method block active */
if (vm.runtimeFlags().allBitsIn(J9Consts.J9_RUNTIME_EXTENDED_METHOD_BLOCK)) {
long extendedMethodBlockSize = 0;
int romMethodCount = ramClass.romClass().romMethodCount().intValue();
extendedMethodBlockSize = romMethodCount + (UDATA.SIZEOF - 1);
extendedMethodBlockSize &= ~(UDATA.SIZEOF - 1);
/*
* Gets the start address of the extended methods. It is just before the ramMethods.
*/
U8Pointer extendedMethodStartAddr = U8Pointer.cast(ramClass.ramMethods()).sub(extendedMethodBlockSize);
classWalkerCallback.addSection(clazz, extendedMethodStartAddr, romMethodCount, "Extended method block", false);
while (romMethodCount-- > 0) {
classWalkerCallback.addSlot(clazz, SlotType.J9_U8, extendedMethodStartAddr.add(romMethodCount), "method flag", "!j9extendedmethodflaginfo");
}
}
}
use of com.ibm.j9ddr.vm29.pointer.U8Pointer in project openj9 by eclipse.
the class ThreadsCommand method getThreadName.
public static String getThreadName(J9VMThreadPointer thread) throws CorruptDataException {
U8Pointer threadName = thread.omrVMThread().threadName();
StringBuffer sb = new StringBuffer();
if (threadName.isNull()) {
sb.append("<NULL>");
} else {
while (!threadName.at(0).eq(0)) {
U8 at = threadName.at(0);
sb.append((char) at.intValue());
threadName = threadName.add(1);
}
}
return sb.toString();
}
Aggregations