use of com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer in project openj9 by eclipse.
the class GCPointerArrayIterator_V1 method next.
@Override
public J9ObjectPointer next() {
try {
if (hasNext()) {
if (includeClassSlot) {
includeClassSlot = false;
return J9ObjectHelper.clazz(object).classObject();
}
J9ObjectPointer next = J9ObjectPointer.cast(data.at(scanIndex));
scanIndex++;
return next;
} else {
throw new NoSuchElementException("There are no more items available through this iterator");
}
} catch (CorruptDataException e) {
// can try to recover from this
raiseCorruptDataEvent("Error getting next item", e, false);
return null;
}
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer in project openj9 by eclipse.
the class GCObjectHeapIteratorSegregated_V1 method next.
public J9ObjectPointer next() {
if (hasNext()) {
J9ObjectPointer next = currentObject;
currentObject = null;
return next;
} else {
throw new NoSuchElementException("There are no more items available through this iterator");
}
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer in project openj9 by eclipse.
the class MMObjectAccessBarrier_V1 method getOwnableSynchronizerLink.
@Override
public J9ObjectPointer getOwnableSynchronizerLink(J9ObjectPointer object) throws CorruptDataException {
UDATA fieldOffset = getExtensions().accessBarrier()._ownableSynchronizerLinkOffset();
J9ObjectPointer next = ObjectReferencePointer.cast(object.addOffset(fieldOffset)).at(0);
if (object.equals(next)) {
return J9ObjectPointer.NULL;
}
return next;
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer in project openj9 by eclipse.
the class MMObjectAccessBarrier_V1 method convertPointerFromToken.
/**
* @see MMObjectAccessBarrier
*/
@Override
public J9ObjectPointer convertPointerFromToken(long token) {
if (token == 0) {
return J9ObjectPointer.NULL;
}
if (J9BuildFlags.gc_compressedPointers) {
UDATA ref = new UDATA(token);
ref = ref.leftShift(shift);
return J9ObjectPointer.cast(ref);
} else {
return J9ObjectPointer.cast(token);
}
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer in project openj9 by eclipse.
the class HeapWalker method walk.
public void walk() {
register(this);
try {
if (hasNextNoHandler()) {
try {
J9ObjectPointer object = heapIterator.next();
doState(object);
if (!hasNextNoHandler()) {
state = STATE_FINISHED;
doState(object);
}
} catch (CorruptDataException e) {
/* CMVC 173382: Due to the corrupt data registration mechanism, we shouldn't
* take action in the event of CDE to prevent double reporting.
*/
}
} else {
throw new NoSuchElementException("The heap walk is complete");
}
} finally {
unregister(this);
}
}
Aggregations