forked from qt-creator/qt-creator
QmlProfiler: Add a QmlTypedEvent and extend QmlEvent
The QmlTypedEvent is mainly useful to read a generic QmlEvent and QmlEventType from a QPacket. QmlEventType has a stream operator to do exactly that. QmlEvent also gets further options to store 32-bit data in addition to 64- and 8-bit data. Also, with the more generic storage layout we can reduce the memory consumption of range events by 50%. This comes at the cost of additional memory allocations for non-range events, but as non-range events are significantly less frequent than range events, this is a good tradeoff. Finally the new storage layout lends itself to efficient serialization, which will help when developing new storage and transfer formats for QML traces. Change-Id: I420de68b0142f23c8fb2ca8b329d7ffe69c83fe0 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
@@ -248,7 +248,7 @@ void QmlProfilerDataModel::addEvent(Message message, RangeType rangeType, int de
|
||||
message == DebugMessage ? QString() : data);
|
||||
QmlEvent eventData = (message == DebugMessage) ?
|
||||
QmlEvent(startTime, duration, -1, data) :
|
||||
QmlEvent(startTime, duration, -1, ndata1, ndata2, ndata3, ndata4, ndata5);
|
||||
QmlEvent(startTime, duration, -1, {ndata1, ndata2, ndata3, ndata4, ndata5});
|
||||
|
||||
QHash<QmlEventType, int>::Iterator it = d->eventTypeIds.find(typeData);
|
||||
if (it != d->eventTypeIds.end()) {
|
||||
|
||||
Reference in New Issue
Block a user