[PATCH] D110081: [llvm-profgen] Filter out invalid debug line

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 28 15:49:12 PDT 2021


hoy accepted this revision.
hoy added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/tools/llvm-profgen/ProfiledBinary.cpp:543
+      // Filter out invalid negative(int type) lineOffset
+      if (LineOffset & 0x80000000)
+        return SampleContextFrameVector();
----------------
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.


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