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:
@@ -113,7 +113,7 @@ void DebugMessagesModel::loadData()
|
||||
continue;
|
||||
|
||||
m_data.insert(insert(event.timestamp(), 0, type.detailType),
|
||||
MessageData(event.stringData(), event.typeIndex()));
|
||||
MessageData(event.string(), event.typeIndex()));
|
||||
if (type.detailType > m_maximumMsgType)
|
||||
m_maximumMsgType = event.typeIndex();
|
||||
updateProgress(count(), simpleModel->events().count());
|
||||
|
||||
Reference in New Issue
Block a user