The memprof profiles and binaries need to be updated in case of version
updates. This change adds three scripts for llvm-profdata, clang and
llvm tests where memprof profiles are used as inputs. Also update the
tests, profiles and binaries in this change. Change based on the review
suggestions in D145023.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/Transforms/PGOProfile/Inputs/update_memprof_inputs.sh | ||
---|---|---|
64 | @tejohnson Turns out the LLVM IR matching issue was due to a difference in the code from which the IR was generated. The one in the comments has a line offset of 30 from main to the callsite of recurse whereas the memprof.ll IR expects a line offset of 31. Perhaps a comment or blank line was omitted? I added a blank line here and added a comment in the update script too. |
Generally lgtm, but why did the raw profiles change size from what is currently committed?
llvm/test/Transforms/PGOProfile/Inputs/update_memprof_inputs.sh | ||
---|---|---|
64 | Hmm, yeah its definitely possible that when the code got copied in a blank line was inadvertently cut. | |
llvm/test/tools/llvm-profdata/Inputs/update_memprof_inputs.sh | ||
15 | Maybe name these more clearly, like BASIC instead of SRC1, etc? |
The reduction in size of the raw profiles is due to D145528 where we moved the initialization flags. The older raw profiles include e.g. 4 entries for the basic test case including calls to malloc from Symbolizer::LateInitialize. These two entries were pruned by the filtering logic in RawMemProfReader but contribute to the original raw file size. After D145528 we only have two entries in the generated raw profile. Verified by making a local change to disable filtering and ran llvm-profdata show --memory on the older profiles.
I'll go ahead and push this. @dblaikie Let me know if you have any comments and I'll follow up separately. Thanks!
@tejohnson Turns out the LLVM IR matching issue was due to a difference in the code from which the IR was generated. The one in the comments has a line offset of 30 from main to the callsite of recurse whereas the memprof.ll IR expects a line offset of 31. Perhaps a comment or blank line was omitted? I added a blank line here and added a comment in the update script too.