QmlProfiler: Drop some dead code

Change-Id: I3eead26da7048ecc839edcc946c677da8a7134be
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Ulf Hermann
2017-02-21 11:42:32 +01:00
parent 5667fdc46a
commit 65e22d5a0a

View File

@@ -108,7 +108,6 @@ void FlameGraphModel::loadEvent(const QmlEvent &event, const QmlEventType &type)
QStack<QmlEvent> &stack = isCompiling ? m_compileStack : m_callStack;
FlameGraphData *&stackTop = isCompiling ? m_compileStackTop : m_callStackTop;
const QmlEvent *potentialParent = &(stack.top());
if (type.message() == MemoryAllocation) {
if (type.detailType() == HeapPage)
return; // We're only interested in actual allocations, not heap pages being mmap'd
@@ -123,10 +122,9 @@ void FlameGraphModel::loadEvent(const QmlEvent &event, const QmlEventType &type)
}
} else if (event.rangeStage() == RangeEnd) {
stackTop->duration += event.timestamp() - potentialParent->timestamp();
stackTop->duration += event.timestamp() - stack.top().timestamp();
stack.pop();
stackTop = stackTop->parent;
potentialParent = &(stack.top());
} else {
QTC_ASSERT(event.rangeStage() == RangeStart, return);
stack.push(event);