[BOLT][NFC] Drop MMap events for deleted files
authorAmir Ayupov <aaupov@fb.com>
Mon, 5 Jun 2023 20:02:59 +0000 (13:02 -0700)
committerAmir Ayupov <aaupov@fb.com>
Mon, 5 Jun 2023 20:03:40 +0000 (13:03 -0700)
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

index 67bd213..a61ca1b 100644 (file)
@@ -1978,6 +1978,8 @@ std::error_code DataAggregator::parseMMapEvents() {
     std::pair<StringRef, MMapInfo> 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);