[llvm] [MC][COFF] Associate pseudo probe desc section with its function (PR #177540)

Haohai Wen via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 23 00:22:46 PST 2026


================
@@ -1289,12 +1289,38 @@ MCObjectFileInfo::getPseudoProbeDescSection(StringRef FuncName) const {
                               S->getEntrySize(), S->getName() + "_" + FuncName,
                               /*IsComdat=*/true);
   } else if (ObjFileType == MCContext::IsCOFF) {
+    // FIXME: For each function generated by the frontend, there's a pseudo
+    // probe descriptor to record its GUID, name and hash. The pseudo probe desc
+    // section should be associated with its function section. However, the
+    // function might be fully inlined. It is possible that several ODR
+    // functions with the same name (GUID) but different bodies (hash) are fully
+    // inlined. Current implementation assumes that GUID is unique and only
+    // preserves one of its descriptors. For probes in those functions, they may
----------------
HaohaiWen wrote:

This issue is similar to static function with same name which can be addressed by -funique-internal-linkage-names.
I think it is a common issue for ELF and COFF. @WenleiHe.

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


More information about the llvm-commits mailing list