[PATCH] D104080: [LLD][LLVM] CG Graph profile using relocations

Alexander Yermolovich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 16 10:26:36 PDT 2021


ayermolo added a comment.

In D104080#2883347 <https://reviews.llvm.org/D104080#2883347>, @echristo wrote:

> In D104080#2835108 <https://reviews.llvm.org/D104080#2835108>, @MaskRay wrote:
>
>> You can mention that this does increase `-fprofile-use=` object file sizes a bit but probably don't matter.
>>
>> For instrumentation PGO users, `-fprofile-generate=` object files are much larger than `-fprofile-use=`, so `-fprofile-use=` slightly size increases don't matter.
>> For sample PGO users, this may increase the peak object file sizes a bit, but doesn't matter as your measurement for clang-13 shows.
>>
>>> Test Plan:
>>> ninja check all, manual rtesting
>>
>> This should be deleted when committing.
>>
>>> The size went up from 107KB to 322KB, aggregate of all the input sections.
>>
>> How large is your clang-13? ~100MiB? Then this increase looks neligible.
>
> I've noticed some increases in object size over here. What's the percentage increase you're expecting here in object file sizes?

So original implementation was 16-bytes (2x4 bytes for index, 8 bytes for Weight). After this @MaskRay changed it to REL implementation. So that's 40 bytes (2x16 bytes for index in relocation form + 8 bytes for Weight). 
When I measured with RELA approach on clang-13 it went from 107KB to 322KB in 118MB binary. With REL, current implementation, that's around 230KB out of 118MB. Now this is final binary size so proportion, in aggregate, of object files will be smaller.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104080/new/

https://reviews.llvm.org/D104080



More information about the llvm-commits mailing list