From a478a0913121cb23402a0b7c1caa2f01780783a7 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Mon, 5 Jun 2023 13:02:59 -0700 Subject: [PATCH] [BOLT][NFC] Drop MMap events for deleted files Don't parse/handle mmap events with "(deleted)" filename. Reviewed By: #bolt, rafauler Differential Revision: https://reviews.llvm.org/D151948 --- bolt/lib/Profile/DataAggregator.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bolt/lib/Profile/DataAggregator.cpp b/bolt/lib/Profile/DataAggregator.cpp index 67bd213..a61ca1b 100644 --- a/bolt/lib/Profile/DataAggregator.cpp +++ b/bolt/lib/Profile/DataAggregator.cpp @@ -1978,6 +1978,8 @@ std::error_code DataAggregator::parseMMapEvents() { std::pair FileMMapInfo = FileMMapInfoRes.get(); if (FileMMapInfo.second.PID == -1) continue; + if (FileMMapInfo.first.equals("(deleted)")) + continue; // Consider only the first mapping of the file for any given PID auto Range = GlobalMMapInfo.equal_range(FileMMapInfo.first); -- 2.7.4