QmlProfiler: Drive event loading from the model manager

We want to get rid of the big master list of QmlEvent in
QmlProfilerDataModel, as that gets very large for longer traces. In
order to reduce the dependencies on that list we load the events on the
fly into the child models while they are being received, rather than
having the child models query QmlProfilerDataModel for the event list
later.

As the trace client so far only emitted rangedEvent() for complete
ranges we run into problems with models that need their events sorted.
The rangedEvent() signals were sorted by end time, rather than start
time which makes it inconvenient to analyze them in a stack based way,
for aggregation. This is solved by passing on all the details from the
trace client to the models, with the QmlProfilerDataModel aggregating
the type information before having the events dispatched to the child
models.

Change-Id: I5831a20551f21cf91e27d298a709f604ebd96c3e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Ulf Hermann
2016-04-28 16:13:16 +02:00
parent dd87df7e5d
commit 4a1e5a637a
24 changed files with 471 additions and 635 deletions

View File

@@ -28,6 +28,7 @@
#include "qmlprofilereventtypes.h"
#include "qmleventlocation.h"
#include "qmlprofiler_global.h"
#include "qmltypedevent.h"
#include <qmldebug/qmldebugclient.h>
@@ -60,12 +61,7 @@ signals:
void traceFinished(qint64 timestamp, const QList<int> &engineIds);
void traceStarted(qint64 timestamp, const QList<int> &engineIds);
void rangedEvent(Message, RangeType, int detailType, qint64 startTime, qint64 length,
const QString &data, const QmlEventLocation &location, qint64 param1,
qint64 param2, qint64 param3, qint64 param4, qint64 param5);
void debugMessage(qint64 timestamp, QtMsgType type, const QString &text,
const QmlEventLocation &location);
void qmlEvent(const QmlEvent &event, const QmlEventType &type);
void recordingChanged(bool arg);
void recordedFeaturesChanged(quint64 features);