Tracing: Move the type storage out of the trace manager

When we replay events we want to keep this constant and pass it to the
event receivers as separate entity. This way we can move the replaying
to a separate thread.

When loading we will have a similar situation, but then the loading
thread will create a new type storage and later assign that to the trace
manager.

Change-Id: I11402ed1e0663da6da5b61b15bba40e1a62adc4b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Ulf Hermann
2018-05-04 17:19:08 +02:00
parent 447befac61
commit 6e0373adb3
14 changed files with 191 additions and 120 deletions

View File

@@ -62,7 +62,6 @@ public:
Clearer clearer = nullptr);
void addEvents(const QVector<QmlEvent> &events);
void addEventTypes(const QVector<QmlEventType> &types);
const QmlEventType &eventType(int typeId) const;
void replayQmlEvents(QmlEventLoader loader, Initializer initializer, Finalizer finalizer,
@@ -75,7 +74,8 @@ public:
static const char *featureName(ProfileFeature feature);
void addEventType(const QmlEventType &type);
int appendEventType(QmlEventType &&type);
void setEventType(int typeId, QmlEventType &&type);
void addEvent(const QmlEvent &event);
void restrictToRange(qint64 start, qint64 end);
@@ -92,9 +92,7 @@ private:
void restrictByFilter(QmlEventFilter filter);
void clearEventStorage() override;
void clearTypeStorage() override;
const Timeline::TraceEventType &lookupType(int typeId) const override;
Timeline::TimelineTraceFile *createTraceFile() override;
void replayEvents(TraceEventLoader loader, Initializer initializer, Finalizer finalizer,
ErrorHandler errorHandler, QFutureInterface<void> &future) const override;