[compiler-rt] r320550 - [XRay][compiler-rt] Reduce XRay log spam

Dean Michael Berris via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 22:37:13 PST 2017


Author: dberris
Date: Tue Dec 12 22:37:13 2017
New Revision: 320550

URL: http://llvm.org/viewvc/llvm-project?rev=320550&view=rev
Log:
[XRay][compiler-rt] Reduce XRay log spam

This change makes XRay print the log file output only when the verbosity
level is higher than 0. It reduces the log spam in the default case when
we want XRay running silently, except when there are actual
fatal/serious errors.

We also update the documentation to show how to get the information
after the change to the default behaviour.

Modified:
    compiler-rt/trunk/lib/xray/xray_utils.cc

Modified: compiler-rt/trunk/lib/xray/xray_utils.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_utils.cc?rev=320550&r1=320549&r2=320550&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_utils.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_utils.cc Tue Dec 12 22:37:13 2017
@@ -117,7 +117,8 @@ int getLogFD() XRAY_NEVER_INSTRUMENT {
            TmpFilename);
     return -1;
   }
-  Report("XRay: Log file in '%s'\n", TmpFilename);
+  if (__sanitizer::Verbosity())
+    Report("XRay: Log file in '%s'\n", TmpFilename);
 
   return Fd;
 }




More information about the llvm-commits mailing list