Update create_gcov to work with version 2 of AutoFDO file format. #117
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The following set of GCC commits has recently changed the format of gcov files:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=23eb66d1d46a34cb28c4acbdf8a1deb80a7c5a05
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=8819c82ce814a6911e2c1bfebd60b1c2366a3805
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=c0954059dba9b369439bcb77643655e42f9a181e
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=6871b899b831b4cb36a24033557c835e53c0b07f
The first commit changed the way strings are stored in the file. Before the change,
the size of the string was stored in words followed by the string padded so that
the size is a multiple of 4. After the change, the size is stored in bytes and there is
no padding.
The second commit bumped the version of AutoFDO file format from 1 to 2.
The last two commits updated the documentation.
This change updates create_gcov to support both the old format (when the version is not 2)
and the new format (when the version is 2).
I also cleaned up gcov_var that had a couple of unused fields.