This is an archive of the discontinued LLVM Phabricator instance.

[llvm-profgen] Ignore invalid perf line in LBR record
ClosedPublic

Authored by wlei on Sep 24 2021, 8:59 AM.

Details

Summary

Similar to https://reviews.llvm.org/D109637, there is a whole invalid line of message in perfscript.

warning: Invalid address in LBR record at line 14118674: Processed 14138923 events and lost 1 chunks!
warning: Invalid address in LBR record at line 14118676: Check IO/CPU overload!

This only happened for LBR only perfscript, hybridperfscript have a check of " 0x" to make sure it's the LBR perf line.

Diff Detail

Event Timeline

wlei created this revision.Sep 24 2021, 8:59 AM
wlei requested review of this revision.Sep 24 2021, 8:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 24 2021, 8:59 AM
wlei retitled this revision from [llvm-profgen] Filter invalid perf line in LBR record to [llvm-profgen] Ignore invalid perf line in LBR record.Sep 24 2021, 9:05 AM
wlei edited the summary of this revision. (Show Details)
wlei added reviewers: hoy, wenlei.
hoy accepted this revision.Sep 24 2021, 9:12 AM

lgtm.

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

This revision is now accepted and ready to land.Sep 24 2021, 9:12 AM
wenlei added inline comments.Sep 24 2021, 9:18 AM
llvm/tools/llvm-profgen/PerfReader.cpp
435

We need to make sure this is a number?

Anything else we should check? Wondering if regex can make things easier and more robust.

wlei added a comment.Sep 24 2021, 9:55 AM

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.

llvm/tools/llvm-profgen/PerfReader.cpp
435

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.

wlei updated this revision to Diff 374887.Sep 24 2021, 9:56 AM

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

wenlei accepted this revision.Sep 24 2021, 12:22 PM

lgtm, thanks.

This revision was landed with ongoing or failed builds.Sep 24 2021, 1:45 PM
This revision was automatically updated to reflect the committed changes.