This is an archive of the discontinued LLVM Phabricator instance.

[SampleFDO] Add a new compact binary format for sample profile
ClosedPublic

Authored by wmi on Jun 8 2018, 11:09 AM.

Details

Summary

Name table occupies a big chunk of size in current binary format sample profile. In order to reduce its size, the patch changes the sample writer/reader to save/restore MD5Hash of names in the name table. Sample annotation phase will also use MD5Hash of name to query samples accordingly.

Experiment shows compact binary format can reduce the size of sample profile by 2/3 compared with binary format generally.

Diff Detail

Repository
rL LLVM

Event Timeline

wmi created this revision.Jun 8 2018, 11:09 AM
wmi updated this revision to Diff 150545.Jun 8 2018, 11:23 AM

Update with a minor refactoring change.

danielcdh accepted this revision.Jun 8 2018, 4:26 PM

This is great stuff!

This revision is now accepted and ready to land.Jun 8 2018, 4:26 PM
This revision was automatically updated to reflect the committed changes.
dyung added a subscriber: dyung.Jun 11 2018, 7:24 PM
dyung added inline comments.
llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp
478 ↗(On Diff #150864)

This description has two items that claim to be the default, is this a typo?