From baa5047dac301d56464720a9054c7e48095870c2 Mon Sep 17 00:00:00 2001 From: Milian Wolff Date: Tue, 23 Jan 2018 11:42:51 +0100 Subject: 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 --- app/perfdata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); } -- cgit v1.2.3