This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Compact legacy profiles
ClosedPublic

Authored by kongyi on Apr 11 2022, 7:05 AM.

Details

Summary

Merging multiple legacy profiles (produced by BOLT instrumentation) can easily reach multiple GiBs. Let merge-fdata compact the profiles to significantly reduce space usage.

Diff Detail

Event Timeline

kongyi created this revision.Apr 11 2022, 7:05 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: ayermolo. · View Herald Transcript
kongyi requested review of this revision.Apr 11 2022, 7:05 AM

Thanks for the improvement. Could you please share before and after numbers you are seeing?

bolt/tools/merge-fdata/merge-fdata.cpp
271
277
kongyi updated this revision to Diff 422076.Apr 11 2022, 4:48 PM
kongyi marked 2 inline comments as done.

Could you please share before and after numbers you are seeing?

Before: merged profile size grows linearly; for a profile from 30 invocations of Clang, it takes more than 3GiB in disk space.

After: merged profile is constant size; the same profile now only takes 100 MiB.

maksfb accepted this revision.Apr 12 2022, 12:23 AM

LGTM

This revision is now accepted and ready to land.Apr 12 2022, 12:23 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2022, 1:43 AM