[PATCH] D34709: [Profile] Improve profile dumping with merging

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 15:51:30 PDT 2017


davidxl marked an inline comment as done.
davidxl added inline comments.


================
Comment at: lib/profile/InstrProfilingWriter.c:281
+      {SkipNameDataWrite ? NULL : NamesBegin, sizeof(uint8_t), NamesSize},
+      {Zeroes, sizeof(uint8_t), Padding}};
   if (Writer->Write(Writer, IOVec, sizeof(IOVec) / sizeof(*IOVec)))
----------------
vsk wrote:
> If we aren't writing the name data, can't we also avoid writing __llvm_profile_data, and the padding?
The profile reader uses the counter begin recorded in the header and the counter ptr recorded in data to compute counter offset.  Assuming  the relative offset remain unchanged, I think it is possible to skip them as well. Since the major cost comes from name section, I'd like to limit the change to name skipping only.


https://reviews.llvm.org/D34709





More information about the llvm-commits mailing list