diff options
| author | Max Moroz <mmoroz@chromium.org> | 2019-08-09 18:20:53 +0000 |
|---|---|---|
| committer | Max Moroz <mmoroz@chromium.org> | 2019-08-09 18:20:53 +0000 |
| commit | 3653aeeffa199dd4c22e38424ea5cdfb4aa01349 (patch) | |
| tree | 92cdea3ef625a29b716ada90713509b391ed2864 /compiler-rt/lib/fuzzer | |
| parent | 665e9676c257124b97a469b98a05c42df9b99d1d (diff) | |
| download | bcm5719-llvm-3653aeeffa199dd4c22e38424ea5cdfb4aa01349.tar.gz bcm5719-llvm-3653aeeffa199dd4c22e38424ea5cdfb4aa01349.zip | |
[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
Diffstat (limited to 'compiler-rt/lib/fuzzer')
| -rw-r--r-- | compiler-rt/lib/fuzzer/FuzzerMerge.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerMerge.cpp b/compiler-rt/lib/fuzzer/FuzzerMerge.cpp index 75b2b5d59b9..bd99128ef7b 100644 --- a/compiler-rt/lib/fuzzer/FuzzerMerge.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerMerge.cpp @@ -239,6 +239,8 @@ void Fuzzer::CrashResistantMergeInternalStep(const std::string &CFPath) { // 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 @@ void Fuzzer::CrashResistantMergeInternalStep(const std::string &CFPath) { OF << "\n"; OF.flush(); } - PrintStats("DONE "); + PrintStats("DONE "); } static void WriteNewControlFile(const std::string &CFPath, |

