[PGO] In llvm-profdata text dump, add comment lines as annotations
authorXinliang David Li <davidxl@google.com>
Mon, 23 Nov 2015 22:31:22 +0000 (22:31 +0000)
committerXinliang David Li <davidxl@google.com>
Mon, 23 Nov 2015 22:31:22 +0000 (22:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253930 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ProfileData/InstrProfWriter.cpp

index 1c97b1ad0d39fc501aca23eea8ce9ea8e076ddae..f9cc2afe3da0d893f040dcfa469c19ad49516605 100644 (file)
@@ -173,7 +173,10 @@ void InstrProfWriter::write(raw_fd_ostream &OS) {
 
 void InstrProfWriter::writeRecordInText(const InstrProfRecord &Func,
                                         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";
 
   for (uint64_t Count : Func.Counts)
     OS << Count << "\n";