[PATCH] D125448: [llvm-profgen] Filter out oversized LBR ranges.

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 11 22:54:09 PDT 2022


wlei created this revision.
Herald added subscribers: hoy, wenlei.
Herald added a project: All.
wlei requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

As a follow up to D123271: [llvm-profgen] Filter out invalid LBR ranges. <https://reviews.llvm.org/D123271>, LBR ranges that are too big should also be considered as invalid.

For example, the last two pairs in the following trace form a range [0x0d7b02b0, 0x368ba706] that covers a ton of functions in the binary. Such oversized range should also be ignored.

  0x0c74505f/0x368b99a0 **0x368ba706**/0x0c745040  0x0d7b1c3f/**0x0d7b02b0**

I'm using the size of the largest binary function range  to define an oversized range, since there cannot be a linear execution range that spans over multiple function ranges.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125448

Files:
  llvm/test/tools/llvm-profgen/Inputs/invalid-range.perfscript
  llvm/test/tools/llvm-profgen/invalid-range.test
  llvm/tools/llvm-profgen/PerfReader.cpp
  llvm/tools/llvm-profgen/PerfReader.h
  llvm/tools/llvm-profgen/ProfiledBinary.cpp
  llvm/tools/llvm-profgen/ProfiledBinary.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125448.428858.patch
Type: text/x-patch
Size: 10842 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220512/b86ebefa/attachment-0001.bin>


More information about the llvm-commits mailing list