use of com.android.tools.profiler.proto.MemoryProfiler.AllocationStack in project android by JetBrains.
the class MemoryInstanceView method instanceChanged.
private void instanceChanged() {
if (mySplitter == null || myInstanceObject == myStage.getSelectedInstance()) {
return;
}
myInstanceObject = myStage.getSelectedInstance();
if (myInstanceObject == null) {
mySplitter.setSecondComponent(null);
return;
}
AllocationStack callStack = myInstanceObject.getCallStack();
if (callStack == null || callStack.getStackFramesList().size() == 0) {
return;
}
DefaultListModel<StackTraceElement> model = new DefaultListModel<>();
callStack.getStackFramesList().forEach(frame -> model.addElement(new StackTraceElement(frame.getClassName(), frame.getMethodName(), frame.getFileName(), frame.getLineNumber())));
mySplitter.setSecondComponent(new JBScrollPane(new JBList(model)));
}
Aggregations