use of com.ibm.j9ddr.view.dtfj.image.J9DDRImageSection in project openj9 by eclipse.
the class DTFJJavaThread method walkSections.
private void walkSections() {
sections = new ArrayList<Object>();
J9JavaStackIterator stacks;
try {
stacks = J9JavaStackIterator.fromJ9JavaStack(thread.stackObject());
} catch (Throwable t) {
CorruptData cd = J9DDRDTFJUtils.handleAsCorruptData(DTFJContext.getProcess(), t);
sections.add(cd);
return;
}
// JEXTRACT seems to be hard coded to only return 1 stack section ... walking the stack finds more than one.
int count = 0;
while (stacks.hasNext() && count < 1) {
J9JavaStackPointer stack = stacks.next();
try {
long size = stack.size().longValue();
long baseAddress = stack.end().longValue() - size;
J9DDRImageSection newSection = DTFJContext.getImageSection(baseAddress, getSectionName());
newSection.setSize(size);
sections.add(newSection);
count++;
} catch (Throwable t) {
CorruptData cd = J9DDRDTFJUtils.handleAsCorruptData(DTFJContext.getProcess(), t);
sections.add(cd);
}
}
}
Aggregations