<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 16, 2021 at 1:26 PM Alexander Yermolovich via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">ayermolo added a comment.<br>
<br>
In D104080#2883347 <<a href="https://reviews.llvm.org/D104080#2883347" rel="noreferrer" target="_blank">https://reviews.llvm.org/D104080#2883347</a>>, @echristo wrote:<br>
<br>
> In D104080#2835108 <<a href="https://reviews.llvm.org/D104080#2835108" rel="noreferrer" target="_blank">https://reviews.llvm.org/D104080#2835108</a>>, @MaskRay wrote:<br>
><br>
>> You can mention that this does increase `-fprofile-use=` object file sizes a bit but probably don't matter.<br>
>><br>
>> For instrumentation PGO users, `-fprofile-generate=` object files are much larger than `-fprofile-use=`, so `-fprofile-use=` slightly size increases don't matter.<br>
>> 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.<br>
>><br>
>>> Test Plan:<br>
>>> ninja check all, manual rtesting<br>
>><br>
>> This should be deleted when committing.<br>
>><br>
>>> The size went up from 107KB to 322KB, aggregate of all the input sections.<br>
>><br>
>> How large is your clang-13? ~100MiB? Then this increase looks neligible.<br>
><br>
> I've noticed some increases in object size over here. What's the percentage increase you're expecting here in object file sizes?<br>
<br>
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). <br>
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.<br></blockquote><div><br></div><div>I'm specifically talking about object file growth rather than binary size. I went ahead and ran a bunch of tests here to get an idea of what percentage increase in object file size we're looking at. In some cases it's about 5%, but the general case is much smaller.</div><div> </div></div></div>