From 22692b9409ed476a33978ae06394b0b6f45ae912 Mon Sep 17 00:00:00 2001 From: Daniel Hoekwater Date: Tue, 3 Feb 2026 22:39:35 +0000 Subject: [PATCH] Filter out SPE records with irrelevant PIDs 975aadd929cbe4995773e3676df1319f95d10916 added support for single binary profiles to SPE-based AFDO profile generation, but it broke support for multi-binary profiles by removing PID-based filtering. Re-add the line that filters out non-mapped PIDs, as even single- binary profiles should include mmap entries for the profiled binary. --- perfdata_reader.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/perfdata_reader.cc b/perfdata_reader.cc index da20cbb..acdac31 100644 --- a/perfdata_reader.cc +++ b/perfdata_reader.cc @@ -432,6 +432,7 @@ absl::Status PerfDataReader::AggregateSpe(BranchFrequencies &result) const { // records. if (is_kernel_mode) pid = kKernelPid; + if (binary_mmaps_.count(pid) == 0) return; if (!record.event.retired || !record.op.is_br_eret) return; uint64_t from_addr = RuntimeAddressToBinaryAddress(pid, record.ip.addr);