[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

Mingming Liu via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jul 18 14:51:45 PDT 2025


================
@@ -603,6 +630,14 @@ class ProfiledBinary {
     return ProbeDecoder.getInlinerDescForProbe(Probe);
   }
 
+  void addMMapNonTextEvent(MMapEvent MMap) {
+    MMapNonTextEvents.push_back(MMap);
+  }
+
+  // Given a runtime address, canonicalize it to the virtual address in the
+  // binary.
----------------
mingmingl-llvm wrote:

Updated the comment to mention 'non-text' and added a TODO to consider unifying text vs non-text. I think it should be possible to do some refactoring, but not sure if we can completely get rid of a data-vs-text hint from caller side (e.g. executable's linking option may affect the code/data to segment mapping).

https://github.com/llvm/llvm-project/pull/148013


More information about the llvm-branch-commits mailing list