Index: client/profilers/perf/perf.py |
diff --git a/client/profilers/perf/perf.py b/client/profilers/perf/perf.py |
index ff0a32eb2516f4fbc887ae95603f7a77ea12e22e..211d562bdaea058341afad4fcbda3b65ec0e3664 100644 |
--- a/client/profilers/perf/perf.py |
+++ b/client/profilers/perf/perf.py |
@@ -5,7 +5,8 @@ supports functionality similar to oprofile and more. |
@see: http://lwn.net/Articles/310260/ |
""" |
-import time, os, subprocess, signal |
+import time, os, stat, subprocess, signal |
+import logging |
from autotest_lib.client.bin import profiler, os_dep, utils |
@@ -51,3 +52,8 @@ class perf(profiler.profiler): |
p = subprocess.Popen(cmd, shell=True, stdout=outfile, |
stderr=subprocess.STDOUT) |
p.wait() |
+ # The raw detailed perf output is HUGE. We cannot store it by default. |
+ perf_log_size = os.stat(self.logfile)[stat.ST_SIZE] |
+ logging.info('Removing %s after generating reports (saving %s bytes).', |
+ self.logfile, perf_log_size) |
+ os.unlink(self.logfile) |