Search in sources :

Example 6 with J9DDRImageSection

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);
        }
    }
}
Also used : J9JavaStackPointer(com.ibm.j9ddr.vm29.pointer.generated.J9JavaStackPointer) J9JavaStackIterator(com.ibm.j9ddr.vm29.j9.J9JavaStackIterator) JavaObject(com.ibm.dtfj.java.JavaObject) CorruptData(com.ibm.dtfj.image.CorruptData) J9DDRCorruptData(com.ibm.j9ddr.view.dtfj.image.J9DDRCorruptData) J9DDRImageSection(com.ibm.j9ddr.view.dtfj.image.J9DDRImageSection)

Aggregations

J9DDRImageSection (com.ibm.j9ddr.view.dtfj.image.J9DDRImageSection)6 CorruptData (com.ibm.dtfj.image.CorruptData)5 ImageSection (com.ibm.dtfj.image.ImageSection)2 J9DDRCorruptData (com.ibm.j9ddr.view.dtfj.image.J9DDRCorruptData)2 LinkedList (java.util.LinkedList)2 CorruptDataException (com.ibm.dtfj.image.CorruptDataException)1 JavaObject (com.ibm.dtfj.java.JavaObject)1 J9DDRDTFJUtils.corruptIterator (com.ibm.j9ddr.view.dtfj.J9DDRDTFJUtils.corruptIterator)1 J9JavaStackIterator (com.ibm.j9ddr.vm29.j9.J9JavaStackIterator)1 GCClassLoaderIterator (com.ibm.j9ddr.vm29.j9.gc.GCClassLoaderIterator)1 GCHeapRegionDescriptor (com.ibm.j9ddr.vm29.j9.gc.GCHeapRegionDescriptor)1 GCVMThreadListIterator (com.ibm.j9ddr.vm29.j9.gc.GCVMThreadListIterator)1 J9MemTagIterator (com.ibm.j9ddr.vm29.j9.walkers.J9MemTagIterator)1 MemoryCategoryIterator (com.ibm.j9ddr.vm29.j9.walkers.MemoryCategoryIterator)1 U8Pointer (com.ibm.j9ddr.vm29.pointer.U8Pointer)1 J9JITExceptionTablePointer (com.ibm.j9ddr.vm29.pointer.generated.J9JITExceptionTablePointer)1 J9JavaStackPointer (com.ibm.j9ddr.vm29.pointer.generated.J9JavaStackPointer)1 J9ROMMethodPointer (com.ibm.j9ddr.vm29.pointer.generated.J9ROMMethodPointer)1 U64 (com.ibm.j9ddr.vm29.types.U64)1 UDATA (com.ibm.j9ddr.vm29.types.UDATA)1