summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2022-06-06 23:36:22 +0200
committerMilian Wolff <milian.wolff@kdab.com>2022-06-08 20:20:37 +0000
commitf7c1a9d99cc72e3ed1b26de8ee55e6cc5feeb92f (patch)
tree9536c46fabedc0dc37a063b325204f58b2b6ad00
parent2a84a40a93e472041aff20250b717658983b6f80 (diff)
Demote unhandled perf feature/type warnings to debug output
This removes warning spam for perf features we simply don't support yet. All of these are not really needed for us right now, so it's pretty useless to spam the end user with these warnings, when we devs know that they are harmless. Examples on my machine: ``` feature not properly read PerfHeader::BPF_PROG_INFO 4 0 feature not properly read PerfHeader::BPF_BTF 4 0 feature not properly read PerfHeader::SAMPLE_TIME 16 0 feature not properly read PerfHeader::CACHE 8808 0 feature not properly read PerfHeader::MEM_TOPOLOGY 88 0 feature not properly read PerfHeader::CPU_TOPOLOGY 1252 892 feature not properly read PerfHeader::CPU_PMU_CAPS 140 0 unhandled event type 79 PERF_RECORD_TIME_CONV unhandled event type 73 PERF_RECORD_THREAD_MAP unhandled event type 74 PERF_RECORD_CPU_MAP ``` We keep the warning for those features that we do support. If we don't read the full size of them, then something changed which we want to be made aware of. Change-Id: I0c6f564518788e6129be671551e84910c3cbf1d0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--app/perfdata.cpp2
-rw-r--r--app/perffeatures.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/app/perfdata.cpp b/app/perfdata.cpp
index af194ce..ef714b9 100644
--- a/app/perfdata.cpp
+++ b/app/perfdata.cpp
@@ -345,7 +345,7 @@ PerfData::ReadStatus PerfData::processEvents(QDataStream &stream)
break;
default:
- qWarning() << "unhandled event type" << m_eventHeader.type << " " << perfEventToString(m_eventHeader.type);
+ qDebug() << "unhandled event type" << m_eventHeader.type << " " << perfEventToString(m_eventHeader.type);
stream.skipRawData(contentSize);
break;
}
diff --git a/app/perffeatures.cpp b/app/perffeatures.cpp
index 9b715a1..9a34b5d 100644
--- a/app/perffeatures.cpp
+++ b/app/perffeatures.cpp
@@ -106,7 +106,8 @@ void PerfFeatures::createFeature(QIODevice *device, QDataStream::ByteOrder byteO
stream >> m_compressed;
break;
default:
- break;
+ qDebug() << "unhandled feature" << featureId << section.size;
+ return;
}
qint64 readSize = device->pos() - section.offset;