use of com.ibm.j9ddr.vm29.pointer.generated.J9MethodPointer in project openj9 by eclipse.
the class DTFJContext method cacheJITMethodAddresses.
private static void cacheJITMethodAddresses() {
jitMethodCache = new HashMap<J9MethodPointer, List<J9JITExceptionTablePointer>>();
try {
J9MemorySegmentListPointer dataCacheList = getVm().jitConfig().dataCacheList();
J9MemorySegmentPointer dataCache = dataCacheList.nextSegment();
while (dataCache.notNull()) {
UDATA current = UDATA.cast(dataCache.heapBase());
UDATA end = UDATA.cast(dataCache.heapAlloc());
while (current.lt(end)) {
J9JITDataCacheHeaderPointer hdr = J9JITDataCacheHeaderPointer.cast(current);
if (hdr.type().longValue() == J9DataTypeExceptionInfo) {
J9JITExceptionTablePointer metaData = J9JITExceptionTablePointer.cast(current.add(J9JITDataCacheHeader.SIZEOF));
addMetaData(metaData);
}
current = current.add(hdr.size());
}
dataCache = dataCache.nextSegment();
}
} catch (CorruptDataException e) {
return;
}
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9MethodPointer in project openj9 by eclipse.
the class DTFJJavaClass method getDeclaredMethods.
@SuppressWarnings("rawtypes")
public Iterator getDeclaredMethods() {
ArrayList<Object> methods;
J9MethodPointer ramMethod;
long methodCount;
try {
ramMethod = j9class.ramMethods();
methodCount = j9class.romClass().romMethodCount().longValue();
if (methodCount > MAX_CLASS_METHODS) {
CorruptData cd = J9DDRDTFJUtils.newCorruptData(DTFJContext.getProcess(), "Corrupt class, maximum number of methods exceeded");
return corruptIterator(cd);
}
methods = new ArrayList<Object>((int) methodCount);
} catch (Throwable t) {
CorruptData cd = J9DDRDTFJUtils.handleAsCorruptData(DTFJContext.getProcess(), t);
return corruptIterator(cd);
}
for (int i = 0; i < methodCount; i++) {
try {
DTFJJavaMethod jmethod = new DTFJJavaMethod(this, ramMethod.add(i));
methods.add(jmethod);
} catch (Throwable t) {
CorruptData cd = J9DDRDTFJUtils.handleAsCorruptData(DTFJContext.getProcess(), t);
methods.add(cd);
}
}
return methods.iterator();
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9MethodPointer in project openj9 by eclipse.
the class J9MethodStructureFormatter method postFormat.
@Override
public FormatWalkResult postFormat(String type, long address, PrintStream out, Context context, List<IFieldFormatter> fieldFormatters, String[] extraArgs) {
if (type.equalsIgnoreCase("j9method")) {
J9MethodPointer method = J9MethodPointer.cast(address);
if (!method.isNull()) {
writeMethodName(method, out);
writeJ9ROMClassAddress(method, out);
writeNextMethodAddress(method, out);
}
}
return FormatWalkResult.KEEP_WALKING;
}
Aggregations