<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Book Antiqua";
        panose-1:2 4 6 2 5 3 5 3 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Book Antiqua",serif;
        color:#943634;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-IE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-family:"Book Antiqua",serif;color:#943634;mso-fareast-language:EN-US'>Thanks for the feedback.  I am off for a short well deserved vacation </span><span style='font-family:Wingdings;color:#943634;mso-fareast-language:EN-US'>J</span><span style='font-family:"Book Antiqua",serif;color:#943634;mso-fareast-language:EN-US'>, but when I get back I will put these suggestions to good use.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Book Antiqua",serif;color:#943634;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Book Antiqua",serif;color:#943634;mso-fareast-language:EN-US'>All the best,<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Book Antiqua",serif;color:#943634;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Book Antiqua",serif;color:#943634;mso-fareast-language:EN-US'>            MartinO<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Book Antiqua",serif;color:#943634;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'> llvm-dev [mailto:llvm-dev-bounces@lists.llvm.org] <b>On Behalf Of </b>Xinliang David Li via llvm-dev<br><b>Sent:</b> 18 July 2017 19:39<br><b>To:</b> Justin Bogner <mail@justinbogner.com><br><b>Cc:</b> Xinliang David Li via llvm-dev <llvm-dev@lists.llvm.org><br><b>Subject:</b> Re: [llvm-dev] PGO, zlib and 'default.profraw'<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>I think that is a good idea.<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>David<o:p></o:p></p></div></div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Tue, Jul 18, 2017 at 11:37 AM, Justin Bogner <<a href="mailto:mail@justinbogner.com" target="_blank">mail@justinbogner.com</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><p class=MsoNormal>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><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>>> *llvm-profdata show -all-functions -counts -detailed-summary -text<br>>> -static-func-full-module-prefix ~/Downloads/default.profraw*<br>>><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>>> *hexdump -C default.profraw*<o:p></o:p></p><div><div><p class=MsoNormal>>><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>>> --------------------------------------------------------------<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>>> _______________________________________________<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" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>>><br>>><br>> _______________________________________________<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" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><o:p></o:p></p></div></div></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>