[llvm] 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:
    llvm/trunk/docs/XRay.rst
    llvm/trunk/docs/XRayExample.rst

Modified: llvm/trunk/docs/XRay.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/XRay.rst?rev=320550&r1=320549&r2=320550&view=diff
==============================================================================
--- llvm/trunk/docs/XRay.rst (original)
+++ llvm/trunk/docs/XRay.rst Tue Dec 12 22:37:13 2017
@@ -164,6 +164,9 @@ variable, where we list down the options
 |                   |                 |               | Data Recorder          |
 |                   |                 |               | (FDR) mode.            |
 +-------------------+-----------------+---------------+------------------------+
+| verbosity         | ``int``         | ``0``         | Runtime verbosity      |
+|                   |                 |               | level.                 |
++-------------------+-----------------+---------------+------------------------+
 
 
 If you choose to not use the default logging implementation that comes with the

Modified: llvm/trunk/docs/XRayExample.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/XRayExample.rst?rev=320550&r1=320549&r2=320550&view=diff
==============================================================================
--- llvm/trunk/docs/XRayExample.rst (original)
+++ llvm/trunk/docs/XRayExample.rst Tue Dec 12 22:37:13 2017
@@ -60,7 +60,7 @@ to enable XRay at application start. To
   $ ./bin/llc input.ll
 
   # We need to set the XRAY_OPTIONS to enable some features.
-  $ XRAY_OPTIONS="patch_premain=true xray_mode=xray-basic" ./bin/llc input.ll
+  $ XRAY_OPTIONS="patch_premain=true xray_mode=xray-basic verbosity=1" ./bin/llc input.ll
   ==69819==XRay: Log file in 'xray-log.llc.m35qPB'
 
 At this point we now have an XRay trace we can start analysing.




More information about the llvm-commits mailing list