This is an archive of the discontinued LLVM Phabricator instance.

[profile] Remove unnecessary field in raw profile reader
ClosedPublic

Authored by davidxl on May 5 2016, 12:11 AM.

Details

Summary

This is a preparation patch that allows us to get rid of the ValueDataSize field in the raw header. By removing that field, the value profile writer code can be greatly simplified without the need to be split into two phases : data gathering and writing, which will also reduce the memory usage in profile runtime (no need to buffer all value data before writing out).

Diff Detail

Event Timeline

davidxl updated this revision to Diff 56240.May 5 2016, 12:11 AM
davidxl retitled this revision from to [profile] Remove unnecessary field in raw profile reader.
davidxl updated this object.
davidxl added a reviewer: vsk.
davidxl added a subscriber: llvm-commits.
vsk accepted this revision.May 5 2016, 10:29 AM
vsk edited edge metadata.

Looks good with a nit.

lib/ProfileData/InstrProfReader.cpp
431

I suggest adding something like getNextHeaderPos() (which asserts atEnd()) to RawInstrProfReader for clarity.

This revision is now accepted and ready to land.May 5 2016, 10:29 AM
silvas accepted this revision.May 5 2016, 12:38 PM
silvas added a reviewer: silvas.
silvas added a subscriber: silvas.

This patch LGTM too.

This revision was automatically updated to reflect the committed changes.

Actually I am not sure. Next one
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/23854 has
that step green, but I see no CL fixing this.