Page MenuHomePhabricator

[CSSPGO] Migrate and refactor the decoder of Pseudo Probe
ClosedPublic

Authored by luoj1 on Jul 27 2021, 4:09 AM.

Details

Summary

Migrate pseudo probe decoding logic in llvm-profgen to MC, so other LLVM-base program could reuse existing codes. Redesign object layout of encoded and decoded pseudo probes.

Diff Detail

Event Timeline

luoj1 created this revision.Jul 27 2021, 4:09 AM
luoj1 requested review of this revision.Jul 27 2021, 4:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 27 2021, 4:10 AM
luoj1 edited the summary of this revision. (Show Details)Jul 27 2021, 12:09 PM
luoj1 added reviewers: hoyFB, wenlei, wlei.
hoy edited reviewers, added: wmi, hoy; removed: hoyFB.Jul 27 2021, 12:27 PM
hoy added a comment.Jul 28 2021, 7:00 PM

P.S. lgtm in general. I have done an around of code review internally before sending out the diff.

llvm/tools/llvm-profgen/ProfiledBinary.cpp
184

Nit: can just use .pseudo_probe_desc instead of ProbeDecoder.getSectionName(). Similarly below.

wlei added inline comments.Jul 28 2021, 7:15 PM
llvm/lib/MC/MCPseudoProbe.cpp
339

Same here

406

As we use return type to handle error, SectionName here is no longer used, right? If so, this can be removed.

luoj1 updated this revision to Diff 362860.Jul 29 2021, 1:17 PM
luoj1 edited the summary of this revision. (Show Details)

remove sectionName

hoy accepted this revision.Aug 2 2021, 5:43 PM

LGTM.

This revision is now accepted and ready to land.Aug 2 2021, 5:43 PM
This revision was landed with ongoing or failed builds.Aug 4 2021, 9:21 AM
This revision was automatically updated to reflect the committed changes.
modimo edited the summary of this revision. (Show Details)Aug 4 2021, 5:22 PM
modimo edited the summary of this revision. (Show Details)