[llvm] r252123 - [libFuzzer] print a bit fewer lines

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 4 17:19:42 PST 2015


Author: kcc
Date: Wed Nov  4 19:19:42 2015
New Revision: 252123

URL: http://llvm.org/viewvc/llvm-project?rev=252123&view=rev
Log:
[libFuzzer] print a bit fewer lines

Modified:
    llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp
    llvm/trunk/lib/Fuzzer/FuzzerUtil.cpp

Modified: llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp?rev=252123&r1=252122&r2=252123&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp Wed Nov  4 19:19:42 2015
@@ -175,7 +175,9 @@ bool Fuzzer::RunOne(const Unit &U) {
   auto UnitStopTime = system_clock::now();
   auto TimeOfUnit =
       duration_cast<seconds>(UnitStopTime - UnitStartTime).count();
-  if (!(TotalNumberOfRuns & (TotalNumberOfRuns - 1)) && Options.Verbosity)
+  if (!(TotalNumberOfRuns & (TotalNumberOfRuns - 1))
+      && secondsSinceProcessStartUp() >= 2
+      && Options.Verbosity)
     PrintStats("pulse ");
   if (TimeOfUnit > TimeOfLongestUnitInSeconds &&
       TimeOfUnit >= Options.ReportSlowUnits) {

Modified: llvm/trunk/lib/Fuzzer/FuzzerUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerUtil.cpp?rev=252123&r1=252122&r2=252123&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerUtil.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerUtil.cpp Wed Nov  4 19:19:42 2015
@@ -52,7 +52,6 @@ static void AlarmHandler(int, siginfo_t
 
 void SetTimer(int Seconds) {
   struct itimerval T {{Seconds, 0}, {Seconds, 0}};
-  Printf("SetTimer %d\n", Seconds);
   int Res = setitimer(ITIMER_REAL, &T, nullptr);
   assert(Res == 0);
   struct sigaction sigact;




More information about the llvm-commits mailing list