summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2018-01-23 11:42:51 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-05-03 12:35:04 +0000
commitbaa5047dac301d56464720a9054c7e48095870c2 (patch)
tree7398be7611bc669e849d5660eca086172bf85edd
parent05692e6459903acbf20c693d7af2c7a5b48c62a2 (diff)
Correctly parse SAMPLE_CPU in PerfSampleId
First read the CPU, then the reserved rest/waste. This ensures we get non-zero CPU IDs for switch events. Change-Id: I54c60e8902a1fd3e9ab5dbd63b46734c551deacd Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
-rw-r--r--app/perfdata.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/perfdata.cpp b/app/perfdata.cpp
index 2f68b1b..e1bc69e 100644
--- a/app/perfdata.cpp
+++ b/app/perfdata.cpp
@@ -406,7 +406,7 @@ QDataStream &operator>>(QDataStream &stream, PerfSampleId &sampleId)
if (sampleId.m_sampleType & PerfEventAttributes::SAMPLE_STREAM_ID)
stream >> sampleId.m_streamId;
if (sampleId.m_sampleType & PerfEventAttributes::SAMPLE_CPU)
- stream >> sampleId.m_res >> sampleId.m_cpu;
+ stream >> sampleId.m_cpu >> sampleId.m_res;
if (sampleId.m_sampleType & PerfEventAttributes::SAMPLE_IDENTIFIER)
stream.skipRawData(sizeof(sampleId.m_ignoredDuplicateId));
}