<div dir="ltr">I think that is a good idea.<div><br></div><div>David</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 18, 2017 at 11:37 AM, Justin Bogner <span dir="ltr"><<a href="mailto:mail@justinbogner.com" target="_blank">mail@justinbogner.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can we improve the error message here? We should be able to check<br>
zlib::isAvailable and give an error like "profile uses zlib compression<br>
but the profile reader was built without zlib support" or so in this<br>
case.<br>
<span class=""><br>
Xinliang David Li via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> writes:<br>
> The __llvm_prf_names section is compressed but your llvm-profdata tool is<br>
> probably not built with zlib enabled.<br>
><br>
> To disable compression, use option -mllvm -enable-name-compression=false<br>
> in your instrumentation build.<br>
><br>
> David<br>
><br>
> On Tue, Jul 18, 2017 at 7:05 AM, ORiordan, Martin via llvm-dev <<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
>> We are trying to get PGO working for our embedded out-of-tree target, but<br>
>> the utility ‘llvm-profdata’ does not like the data we are giving it.<br>
>><br>
>><br>
>><br>
>> Because this is not a hosted environment, we have to off-chip the<br>
>> profiling data ourselves, and although the data looks okay, ‘llvm-profdata’<br>
>> reports the following error:<br>
>><br>
>><br>
>><br>
</span>>> *llvm-profdata show -all-functions -counts -detailed-summary -text<br>
>> -static-func-full-module-<wbr>prefix ~/Downloads/default.profraw*<br>
<span class="">>><br>
>> error: ~/Downloads/default.profraw: Failed to uncompress data (zlib)<br>
>><br>
>><br>
>><br>
>> But even for a hosted system, it is not clear to me where ‘zlib’ gets<br>
>> involved in compressing the data. The start of our data looks like:<br>
>><br>
>><br>
>><br>
</span>>> *hexdump -C default.profraw*<br>
<div class="HOEnZb"><div class="h5">>><br>
>> 00000000 81 52 66 6f 72 70 6c ff 04 00 00 00 00 00 00<br>
>><br>
>> 00 |.Rforpl.........|<br>
>><br>
>> 00000010 3c 00 00 00 00 00 00 00 28 01 00 00 00 00 00<br>
>><br>
>> 00 |<.......(.......|<br>
>><br>
>><br>
>><br>
>> Which looks valid for Little-Endian, 32-bit and LLVM v4.0.<br>
>><br>
>><br>
>><br>
>> What do we need to do to prepare this raw data from the device into the<br>
>> form that ‘llvm-profdata’ needs to see?<br>
>><br>
>><br>
>><br>
>> Thanks,<br>
>><br>
>><br>
>><br>
>> MartinO<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> ------------------------------<wbr>------------------------------<wbr>--<br>
>> Intel Research and Development Ireland Limited<br>
>> Registered in Ireland<br>
>> Registered Office: Collinstown Industrial Park, Leixlip, County Kildare<br>
>> Registered Number: 308263<br>
>><br>
>> This e-mail and any attachments may contain confidential material for the<br>
>> sole use of the intended recipient(s). Any review or distribution by others<br>
>> is strictly prohibited. If you are not the intended recipient, please<br>
>> contact the sender and delete all copies.<br>
>><br>
>><br>
>> ______________________________<wbr>_________________<br>
>> LLVM Developers mailing list<br>
>> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
>><br>
>><br>
> ______________________________<wbr>_________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</div></div></blockquote></div><br></div>