[PATCH] D110081: [llvm-profgen] Filter out invalid debug line
Lei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 30 15:13:50 PDT 2021
wlei added inline comments.
================
Comment at: llvm/tools/llvm-profgen/ProfiledBinary.cpp:543
+ // Filter out invalid negative(int type) lineOffset
+ if (LineOffset & 0x80000000)
+ return SampleContextFrameVector();
----------------
hoy wrote:
> Can we potentially lose contexts when an invalid line offset is one of the frames? Like `A:-1 @ B:2 @ C:3`, without this change, we could still have samples for `B:2 @ C:3`. But I think that's rare.
>
> LGTM.
> Can we potentially lose contexts when an invalid line offset is one of the frames? Like A:-1 @ B:2 @ C:3, without this change, we could still have samples for B:2 @ C:3. But I think that's rare.
I haven't seen those cases, it seems it only happened for leaf frame. Even it can be leaf call, there is no samples hit the callee. I can add a warning on the non-leaf frame invalid line of stack address.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110081/new/
https://reviews.llvm.org/D110081
More information about the llvm-commits
mailing list