forked from qt-creator/qt-creator
Add basic support for new AttributesDefinition
We read the attributes, but don't use the new data, yet. Change-Id: Idb983dee60b76ae8f22375e9070042660cf5e612 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
This commit is contained in:
@@ -95,6 +95,7 @@ inline QDataStream &operator>>(QDataStream &stream, PerfEvent &event)
|
||||
case PerfEventType::Command:
|
||||
case PerfEventType::LocationDefinition:
|
||||
case PerfEventType::SymbolDefinition:
|
||||
case PerfEventType::AttributesDefinition49:
|
||||
case PerfEventType::AttributesDefinition:
|
||||
case PerfEventType::StringDefinition:
|
||||
case PerfEventType::FeaturesDefinition:
|
||||
|
@@ -45,7 +45,7 @@ public:
|
||||
Command,
|
||||
LocationDefinition,
|
||||
SymbolDefinition,
|
||||
AttributesDefinition,
|
||||
AttributesDefinition49,
|
||||
StringDefinition,
|
||||
LostDefinition,
|
||||
FeaturesDefinition,
|
||||
@@ -54,13 +54,14 @@ public:
|
||||
Progress,
|
||||
TracePointFormat,
|
||||
TracePointSample,
|
||||
AttributesDefinition,
|
||||
InvalidFeature
|
||||
};
|
||||
|
||||
static quint64 attributeFeatures()
|
||||
{
|
||||
return (1ull << Sample43) | (1ull << Sample) | (1ull << TracePointSample)
|
||||
| (1ull << AttributesDefinition);
|
||||
| (1ull << AttributesDefinition49) | (1ull << AttributesDefinition);
|
||||
}
|
||||
|
||||
static quint64 metaFeatures()
|
||||
@@ -128,6 +129,7 @@ public:
|
||||
switch (feature()) {
|
||||
case Sample43:
|
||||
case Sample:
|
||||
case AttributesDefinition49:
|
||||
case AttributesDefinition:
|
||||
case TracePointSample:
|
||||
return true;
|
||||
|
@@ -188,9 +188,15 @@ void PerfProfilerTraceFile::readMessages(const QByteArray &buffer)
|
||||
traceManager->setSymbol(id, symbol);
|
||||
break;
|
||||
}
|
||||
case PerfEventType::AttributesDefinition49:
|
||||
case PerfEventType::AttributesDefinition: {
|
||||
PerfEventType attributes(PerfEventType::AttributesDefinition);
|
||||
PerfEventType attributes(PerfEventType::AttributesDefinition49);
|
||||
dataStream >> id >> attributes;
|
||||
if (event.feature() == PerfEventType::AttributesDefinition) {
|
||||
bool usesFrequency;
|
||||
quint64 frequencyOrPeriod;
|
||||
dataStream >> usesFrequency >> frequencyOrPeriod;
|
||||
}
|
||||
traceManager->setEventType(PerfEvent::LastSpecialTypeId - id, std::move(attributes));
|
||||
break;
|
||||
}
|
||||
@@ -451,7 +457,7 @@ void PerfProfilerTraceFile::writeToDevice()
|
||||
|
||||
{
|
||||
CompressedDataStream bufferStream(m_device.data());
|
||||
const quint8 feature = PerfEventType::AttributesDefinition;
|
||||
const quint8 feature = PerfEventType::AttributesDefinition49;
|
||||
qint32 id = 0;
|
||||
for (const PerfEventType &attribute : traceManager->attributes()) {
|
||||
if (!attribute.isAttribute())
|
||||
|
@@ -179,7 +179,7 @@ void PerfProfilerTraceManager::clearTypeStorage()
|
||||
|
||||
const Timeline::TraceEventType &PerfProfilerEventTypeStorage::get(int typeId) const
|
||||
{
|
||||
static const PerfEventType emptyAttribute(PerfEventType::AttributesDefinition);
|
||||
static const PerfEventType emptyAttribute(PerfEventType::AttributesDefinition49);
|
||||
static const PerfEventType emptyLocation(PerfEventType::LocationDefinition);
|
||||
|
||||
if (typeId >= 0) {
|
||||
|
Reference in New Issue
Block a user