[compiler-rt] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 13:50:06 PDT 2023


================
@@ -124,9 +124,27 @@ int __llvm_profile_merge_from_buffer(const char *ProfileData,
   SrcCountersEnd = SrcCountersStart +
                    Header->NumCounters * __llvm_profile_counter_entry_size();
   SrcNameStart = SrcCountersEnd;
-  SrcValueProfDataStart =
+
+  // Skip vtable profile data section and vtable names sections for runtime
+  // profile merge. To merge runtime addresses from multiple profiles, the
+  // same instrumented binary should run with ASLR disabled -> in this set-up
----------------
snehasish wrote:

nit: the if the binary is built with no-pie (position independent executable) then it does not matter whether ASLR is enabled or not. You need ASLR + PIE to have mismatches here.

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


More information about the llvm-commits mailing list