[PATCH] D107097: [llvm-profgen] Support perf script without parsing MMap events
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 30 18:29:29 PDT 2021
wenlei added inline comments.
================
Comment at: llvm/tools/llvm-profgen/PerfReader.cpp:662
+ if (EventSeenFirst.hasValue() && !EventSeenFirst.getValue()) {
+ WithColor::warning() << "Interior mmap event but no leading mmap event!\n";
+ } else if (!EventSeenFirst.hasValue()) {
----------------
hoy wrote:
> wenlei wrote:
> > The term "Interior mmap event" could be confusing..
> >
> > The warning I was thinking is for when LBR/stack sample is seen before a relevant mmap is seen, in which case we warn about assuming preferred based address due to not seeing corresponding mmap. It doesn't matter whether we found other mmap event later or not.
> That sounds reasonable. In that case, the warning should be issued in `parseSample` for the first sample that does not have a leading mmap event.
Sorry if I wasn't clear. But note the "relevant mmap" in my previous comment - the way `EventSeen` is set here doesn't guarantee that the mmap seen is relevant for the binary we're interested in. Say if we want to generate profile for foo.so, we'd still want to warn if mmap for foo.so isn't seen (we may have seen mmap for other binaries) before we have a sample that is concluded to belong to foo.so's address space based on the preferred base.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107097/new/
https://reviews.llvm.org/D107097
More information about the llvm-commits
mailing list