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.


git-svn-id: https://llvm.org/svn/llvm-project/test-suite/trunk@300696 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/litsupport/perf.py b/litsupport/perf.py
index 932caf1..285c49e 100644
--- a/litsupport/perf.py
+++ b/litsupport/perf.py
@@ -12,8 +12,17 @@
     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()