[PATCH] D110424: [llvm-profgen] Ignore invalid perf line in LBR record

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 24 09:55:45 PDT 2021


wlei added a comment.

In D110424#3020965 <https://reviews.llvm.org/D110424#3020965>, @hoy wrote:

> lgtm.
>
> Wondering for the two example warning lines, did the check against the first leading address before first LBR record pass?

yeah, just added the check.



================
Comment at: llvm/tools/llvm-profgen/PerfReader.cpp:424
   if (!Records.empty() && Records[0].find('/') == StringRef::npos) {
     Index = 1;
   }
----------------
wenlei wrote:
> We need to make sure this is a number? 
> 
> Anything else we should check? Wondering if regex can make things easier and more robust.
> We need to make sure this is a number?
fixed

> Anything else we should check?
with this.fix, it can pass our ads service perf.

> Wondering if regex can make things easier and more robust.
Sounds good, I can have a try.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110424/new/

https://reviews.llvm.org/D110424



More information about the llvm-commits mailing list