[compiler-rt] [llvm] Reland "[TypeProf][InstrPGO] Introduce raw and instr profile format change for type profiling." (PR #82711)
Mingming Liu via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 7 17:03:11 PDT 2024
minglotus-6 wrote:
> Do you know by any chance how raw-{32, 64}-bits-{le, be}.test were generated?
I don't know how they were generated initially. When I updated these tests, I manually added the bytes in `RUN: printf` lines and initially had to run `llvm-profdata show` in a debugger (gdb) to get the test pass.
Given a binary raw profile, [hexdump](https://man7.org/linux/man-pages/man1/hexdump.1.html) should print the bytes ([example](https://github.com/llvm/llvm-project/compare/main...minglotus-6:llvm-project:endiannesstest#diff-1736a3ee25dde02bba55d670df78988fdb227e5a85b94b8707cf182cf70b28f0)). But the output is still painful to map bytes to the (likely multi-byte) fields in a (multi-section) raw profile.
> I am trying to re-generate them with this patch, but without a [previous](https://github.com/llvm/llvm-project/commit/f95b2f1acf1171abb0d00089fd4c9238753847e3) changes, and having trouble getting 64 bit ones to pass.
Is there a pointer showing the failed test? And which section (profile header, per function profile data, etc) is failing the raw profile reader? I remember I got stumbled on updating [`CounterPtr`](https://github.com/llvm/llvm-project/blob/bcd586b5abfc7c22a1c0eca3a7abf18e7a09518d/compiler-rt/include/profile/InstrProfData.inc#L80) which records relative offset, illustrated with ASCII art in https://llvm.org/docs/InstrProfileFormat.html#profile-counters
https://github.com/llvm/llvm-project/pull/82711
More information about the llvm-commits
mailing list