[llvm-dev] PGO, zlib and 'default.profraw'

陳韋任 via llvm-dev
Tue, 18 Jul 2017 14:17:57 -0000

You might want to set breakpoint on readPGOFuncNameStrings [1] to see
what's going on.

[1] http://llvm.org/doxygen/InstrProf_8cpp_source.html

2017-07-18 22:05 GMT+08:00 ORiordan, Martin via llvm-dev
<llvm-dev at lists.llvm.org>:
> We are trying to get PGO working for our embedded out-of-tree target, but
> the utility ‘llvm-profdata’ does not like the data we are giving it.
>
>
>
> Because this is not a hosted environment, we have to off-chip the profiling
> data ourselves, and although the data looks okay, ‘llvm-profdata’ reports
> the following error:
>
>
>
> llvm-profdata show -all-functions -counts -detailed-summary -text
> -static-func-full-module-prefix ~/Downloads/default.profraw
>
> error: ~/Downloads/default.profraw: Failed to uncompress data (zlib)
>
>
>
> But even for a hosted system, it is not clear to me where ‘zlib’ gets
> involved in compressing the data.  The start of our data looks like:
>
>
>
> hexdump -C default.profraw
>
> 00000000  81 52 66 6f 72 70 6c ff  04 00 00 00 00 00 00
>
> 00  |.Rforpl.........|
>
> 00000010  3c 00 00 00 00 00 00 00  28 01 00 00 00 00 00
>
> 00  |<.......(.......|
>
>
>
> Which looks valid for Little-Endian, 32-bit and LLVM v4.0.
>
>
>
> What do we need to do to prepare this raw data from the device into the
form
> that ‘llvm-profdata’ needs to see?
>
>
>
> Thanks,
>
>
>
>             MartinO
>
>
>
>
>
> --------------------------------------------------------------
> Intel Research and Development Ireland Limited
> Registered in Ireland
> Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
> Registered Number: 308263
>
> This e-mail and any attachments may contain confidential material for the
> sole use of the intended recipient(s). Any review or distribution by others
> is strictly prohibited. If you are not the intended recipient, please
> contact the sender and delete all copies.
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>



--
Wei-Ren Chen (陳韋任)
Homepage: https://people.cs.nctu.edu.tw/~chenwj