diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2018-11-01 11:08:26 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2018-11-14 08:44:39 +0000 |
commit | 8af9d69554065924f9c92b29dd09d08ba6650328 (patch) | |
tree | 9244b642cf5db61ab81281eef1671bb5d15a9caf /src/plugins | |
parent | dcf41b5f69d0e199d0a6a8faaad981f73e1c9aa0 (diff) |
QML Tooling: Fix ordering of memory events in V4 profiler adapter
We should not send memory events that are chronologically after the next
call event, even if the time threshold given by the profiler service
would allow us to do so. When the remaining call events are sent, the
chronological order would otherwise be violated.
Fixes: QTBUG-71515
Change-Id: Iee27304f836a899b2b35133316cecd3d34f128c6
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.cpp b/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.cpp index e4f2f556fc..12c36f3dd6 100644 --- a/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.cpp +++ b/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.cpp @@ -87,14 +87,17 @@ qint64 QV4ProfilerAdapter::appendMemoryEvents(qint64 until, QList<QByteArray> &m qint64 QV4ProfilerAdapter::finalizeMessages(qint64 until, QList<QByteArray> &messages, qint64 callNext, QQmlDebugPacket &d) { + qint64 memoryNext = -1; + if (callNext == -1) { m_functionLocations.clear(); m_functionCallData.clear(); m_functionCallPos = 0; + memoryNext = appendMemoryEvents(until, messages, d); + } else { + memoryNext = appendMemoryEvents(qMin(callNext, until), messages, d); } - qint64 memoryNext = appendMemoryEvents(until, messages, d); - if (memoryNext == -1) { m_memoryData.clear(); m_memoryPos = 0; |