[PGO] In llvm-profdata text dump, add comment lines as annotations

llvm-svn: 253930
This commit is contained in:
Xinliang David Li 2015-11-23 22:31:22 +00:00
parent af76cac3cc
commit 1226a008ae

View File

@ -173,7 +173,10 @@ void InstrProfWriter::write(raw_fd_ostream &OS) {
void InstrProfWriter::writeRecordInText(const InstrProfRecord &Func,
raw_fd_ostream &OS) {
OS << Func.Name << "\n" << Func.Hash << "\n" << Func.Counts.size() << "\n";
OS << Func.Name << "\n";
OS << "# Func Hash:\n" << Func.Hash << "\n";
OS << "# Num Counters:\n" <<Func.Counts.size() << "\n";
OS << "# Counter Values:\n";
for (uint64_t Count : Func.Counts)
OS << Count << "\n";