[libFuzzer] Merge: print stats after reading the output corpus dir.

Summary:
The purpose is to be able to extract the number of new edges added to
the original (i.e. output) corpus directory after doing the merge. Use case
example: in ClusterFuzz, we do merge after every fuzzing session, to avoid
uploading too many corpus files, and we also record coverage stats at that
point. Having a separate line indicating stats after reading the initial output
corpus directory would make the stats extraction easier for both humans and
parsing scripts.

Context: https://github.com/google/clusterfuzz/issues/802.

Reviewers: morehouse, hctim

Reviewed By: hctim

Subscribers: delcypher, #sanitizers, llvm-commits, kcc

Tags: #llvm, #sanitizers

Differential Revision: https://reviews.llvm.org/D66020

llvm-svn: 368461
GitOrigin-RevId: 3653aeeffa199dd4c22e38424ea5cdfb4aa01349
diff --git a/FuzzerMerge.cpp b/FuzzerMerge.cpp
index 75b2b5d..bd99128 100644
--- a/FuzzerMerge.cpp
+++ b/FuzzerMerge.cpp
@@ -239,6 +239,8 @@
     // Show stats.
     if (!(TotalNumberOfRuns & (TotalNumberOfRuns - 1)))
       PrintStats("pulse ");
+    if (TotalNumberOfRuns == M.NumFilesInFirstCorpus)
+      PrintStats("LOADED");
     // Write the post-run marker and the coverage.
     OF << "FT " << i;
     for (size_t F : UniqFeatures)
@@ -252,7 +254,7 @@
     OF << "\n";
     OF.flush();
   }
-  PrintStats("DONE ");
+  PrintStats("DONE  ");
 }
 
 static void WriteNewControlFile(const std::string &CFPath,