Page MenuHomePhabricator

[SampleFDO] Add FunctionOffsetTable in compact binary format profile.

Authored by wmi on Sep 10 2018, 9:09 AM.



The patch saves a function offset table which maps function name index to the offset of its function profile to the start of the binary profile. By using the function offset table, for those function profiles which will not be used when compiling a module, the profile reader does't have to read them. For profile size around 10~20M, it saves ~10% compile time.

Diff Detail


Event Timeline

wmi created this revision.Sep 10 2018, 9:09 AM
danielcdh accepted this revision.Sep 10 2018, 10:20 AM
This revision is now accepted and ready to land.Sep 10 2018, 10:20 AM
wmi updated this revision to Diff 164702.Sep 10 2018, 11:00 AM

Add some cleanup, please take another look:
Add virtual function collectFuncsToUse to remove the awareness of format change in sample profile loader pass.

danielcdh accepted this revision.Sep 14 2018, 11:46 AM
This revision was automatically updated to reflect the committed changes.