Commit 2080096e authored by Ulf Hermann's avatar Ulf Hermann
Browse files

FlameGraph: Attribute extra space in root item to "others"



The QML profiler's memory and allocations mode includes allocations from
non-QML code. The space allocated for those in the flame graph shouldn't
just be empty.

Change-Id: I390bf880097d51a19d5027b06bda25dbfaecc09e
Task-number: QTCREATORBUG-17939
Reviewed-by: Joerg Bornemann's avatarJoerg Bornemann <joerg.bornemann@qt.io>
parent 36a913b4
......@@ -155,6 +155,10 @@ int FlameGraph::buildNode(const QModelIndex &parentIndex, QObject *parentObject,
}
}
// Root object: attribute all remaining width to "others"
if (!parentIndex.isValid())
skipped = parentSize - position;
if (skipped > 0) {
appendChild(parentObject, parentItem, context, QModelIndex(), position / parentSize,
skipped / parentSize);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment