[test-suite] r300696 - Pipe output to /dev/null when running under perf record

Kristof Beyls via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 19 07:48:58 PDT 2017


Author: kbeyls
Date: Wed Apr 19 09:48:58 2017
New Revision: 300696

URL: http://llvm.org/viewvc/llvm-project?rev=300696&view=rev
Log:
Pipe output to /dev/null when running under perf record

... to avoid the test.log growing to 400MB per run of the test-suite
when using the perf record profiling feature.

Modified:
    test-suite/trunk/litsupport/perf.py

Modified: test-suite/trunk/litsupport/perf.py
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/litsupport/perf.py?rev=300696&r1=300695&r2=300696&view=diff
==============================================================================
--- test-suite/trunk/litsupport/perf.py (original)
+++ test-suite/trunk/litsupport/perf.py Wed Apr 19 09:48:58 2017
@@ -12,8 +12,17 @@ def mutateCommandLine(context, commandli
     cmd.wrap('perf', [
         'record',
         '-e', 'cycles,cache-misses,branch-misses',
-        '-o', profilefile
+        '-o', profilefile,
+        '--'
     ])
+    if cmd.stdout is None:
+        cmd.stdout = "/dev/null"
+    else:
+        cmd.stdout += ".perfrecord"
+    if cmd.stderr is None:
+        cmd.stderr = "/dev/null"
+    else:
+        cmd.stderr += ".perfrecord"
     return cmd.toCommandline()
 
 




More information about the llvm-commits mailing list