Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jifa-dev] Custom MAT build - SnapshotInfo.getHeapLayout returns null with regular hprof

I see you have added a 'heap layout', however normal JDK hprof does not have this information, and there are numerous parts of JIFA which rely on it.

Specifically, `getHeapLayout()` can return null and is called in a few places. It can be fixed by always returning the UNKNOWN heap layout:

This works for me.
`````
  public boolean layoutAvailable() {
    return getHeapLayout().type() != HeapLayout.HeapType.UNKNOWN;
  }
 
  public HeapLayout getHeapLayout() {
    return (this.heapLayout == null) ? UNKNOWN_HEAP_LAYOUT : this.heapLayout;
  }
`````

Back to the top