summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerLoop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerLoop.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerLoop.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerLoop.cpp b/llvm/lib/Fuzzer/FuzzerLoop.cpp
index ad2e6d7c880..0c587288876 100644
--- a/llvm/lib/Fuzzer/FuzzerLoop.cpp
+++ b/llvm/lib/Fuzzer/FuzzerLoop.cpp
@@ -168,6 +168,7 @@ Fuzzer::Fuzzer(UserCallback CB, InputCorpus &Corpus, MutationDispatcher &MD,
EF->__sanitizer_install_malloc_and_free_hooks(MallocHook, FreeHook);
TPC.SetUseCounters(Options.UseCounters);
TPC.SetUseValueProfile(Options.UseValueProfile);
+ TPC.SetPrintNewPCs(Options.PrintNewCovPcs);
if (Options.Verbosity)
TPC.PrintModuleInfo();
@@ -556,26 +557,13 @@ void Fuzzer::PrintStatusForNewUnit(const Unit &U) {
}
}
-void Fuzzer::PrintOneNewPC(uintptr_t PC) {
- PrintPC("\tNEW_PC: %p %F %L\n",
- "\tNEW_PC: %p\n", PC);
-}
-
-void Fuzzer::PrintNewPCs() {
- if (!Options.PrintNewCovPcs) return;
- uintptr_t *PCIDs;
- if (size_t NumNewPCIDs = TPC.GetNewPCIDs(&PCIDs))
- for (size_t i = 0; i < NumNewPCIDs; i++)
- PrintOneNewPC(TPC.GetPCbyPCID(PCIDs[i]));
-}
-
void Fuzzer::ReportNewCoverage(InputInfo *II, const Unit &U) {
II->NumSuccessfullMutations++;
MD.RecordSuccessfulMutationSequence();
PrintStatusForNewUnit(U);
WriteToOutputCorpus(U);
NumberOfNewUnitsAdded++;
- PrintNewPCs();
+ TPC.PrintNewPCs();
}
// Finds minimal number of units in 'Extra' that add coverage to 'Initial'.
OpenPOWER on IntegriCloud