[PATCH] D153588: [Pseudo Probe] Remove the assert of allowing only one call probe for a callsite.
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 23 16:39:32 PDT 2023
hoy updated this revision to Diff 534121.
hoy added a comment.
Updating comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153588/new/
https://reviews.llvm.org/D153588
Files:
llvm/lib/MC/MCPseudoProbe.cpp
Index: llvm/lib/MC/MCPseudoProbe.cpp
===================================================================
--- llvm/lib/MC/MCPseudoProbe.cpp
+++ llvm/lib/MC/MCPseudoProbe.cpp
@@ -584,10 +584,20 @@
const MCDecodedPseudoProbe *CallProbe = nullptr;
for (const auto &Probe : Probes) {
if (Probe.isCall()) {
- assert(!CallProbe &&
- "There should be only one call probe corresponding to address "
- "which is a callsite.");
+ // Disabling the assert and returning first call probe seen so far.
+ // Subsequent call probes, if any, are ignored. Due to the the way
+ // .pseudo_probe section is decoded, probes of the same-named independent
+ // static functions are merged thus multiple call probes may be seen for a
+ // callsite. This should only happen to compiler-generated statics, with
+ // -funique-internal-linkage-names where user statics get unique names.
+ //
+ // TODO: re-enable or narrow down the assert to static functions only.
+ //
+ // assert(!CallProbe &&
+ // "There should be only one call probe corresponding to address "
+ // "which is a callsite.");
CallProbe = &Probe;
+ break;
}
}
return CallProbe;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153588.534121.patch
Type: text/x-patch
Size: 1254 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230623/21ea3f24/attachment.bin>
More information about the llvm-commits
mailing list