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

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 17:34:23 PDT 2017


vsk accepted this revision.
vsk added a comment.
This revision is now accepted and ready to land.

Thanks, lgtm.



================
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)))
----------------
davidxl wrote:
> 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.
Ok, I see this in RawInstrProfReader::getCounter.


https://reviews.llvm.org/D34709





More information about the llvm-commits mailing list