The change includes three patches
- LLVM changes (Patch-1)
- Clang Driver changes (Patch-2)
- compile-rt (patch-3)
Description of the changes:
- The patch implements a new option -f[no]-profile-instr-with-names option. When -fno-profile-instr-with-names is turned on, the instrumentation will use function assembly name's md5 hash string (hex form) instead of the raw name as the profile identification key. With this change, binary and profile size is greatly reduced
- refactor of the instrumentation and compile-rt code such that Magic and Version (raw, and indexed) values for profile data is specified in one centralized place: InstrProf.h. To assist this change, compile_rt code no longer needs to hard code the version/magic values and will never be out of sync with instrumentor
- The 64bit version field in the header is partitioned into two parts a) the lower 32bit is used to represent the format version as before b) the upper 32bit is now used to encode feature/variants of the profile data that share the same format. In this case, it can be used to indicate if the profile contains raw name keys or md5hash keys. Another use of the bit is the late instrumentation profile data.
typo fromat -> format