[llvm] [llvm-profgen] Fix bogus trace check (PR #225569)
Kunal Pathak via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 23 09:51:37 PDT 2026
================
@@ -881,6 +880,15 @@ void PerfScriptReader::warnIfMissingMMap() {
}
}
+// The unwinder requires that LBR tip belong to the leaf frame.
+// External addresses are not checked.
+static bool isValidTrace(ProfiledBinary *Binary, uint64_t StackLeaf,
+ uint64_t LBRLeaf) {
+ if (StackLeaf == ExternalAddr || LBRLeaf == ExternalAddr)
----------------
kunalspathak wrote:
Got it. What if we return `false` if BOTH `StackLeaf` and `LBRLeaf` are `ExternalAddr`? Do you know if such cases also gets filtered out and hence no need to return `false` here?
```c++
if (StackLeaf == ExternalAddr && LBRLeaf == ExternalAddr)
return false;
```
https://github.com/llvm/llvm-project/pull/225569
More information about the llvm-commits
mailing list