From 16520aca25962d827543277c4d12d5d6143f105e Mon Sep 17 00:00:00 2001 From: Kugan Vivekanandarajah Date: Mon, 15 Dec 2025 08:54:59 +1100 Subject: [PATCH] [SPE] Skip SAMPLE events to avoid unsupported PERF_SAMPLE_REGS_USER This patch avoids reading PERF samples that is not relavent. We only need AUXTRACE events for SPE data. This filtering is similar to what is already done in other places. --- simple_spe_sample_reader.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/simple_spe_sample_reader.cc b/simple_spe_sample_reader.cc index a1d59ad..d0c3c66 100644 --- a/simple_spe_sample_reader.cc +++ b/simple_spe_sample_reader.cc @@ -151,6 +151,12 @@ bool SimpleSpeDataSampleReader::Append(const std::string &profile_file) { bool SimpleSpeDataSampleReader::Read() { // Read the perf data file quipper::PerfReader reader; + // Skip SAMPLE events to avoid unsupported PERF_SAMPLE_REGS_USER + // We only need AUXTRACE events for SPE data + reader.SetEventTypesToSkipWhenSerializing( + {quipper::PERF_RECORD_SAMPLE, quipper::PERF_RECORD_FORK, + quipper::PERF_RECORD_COMM}); + if (!reader.ReadFile(profile_file_)) { LOG(ERROR) << "Failed to read perf data file: " << profile_file_; return false;