aboutsummaryrefslogtreecommitdiff
path: root/crosperf/results_cache.py
diff options
context:
space:
mode:
authorcmtice <cmtice@google.com>2014-03-20 11:28:29 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-03-25 03:33:20 +0000
commit24846b19591ca4fb1d03d0c80a2e86effc55c0f6 (patch)
treeb9d0b20cff89b3af23b0d3a75d521643be3605cc /crosperf/results_cache.py
parent77892948fa796a65ada0985acb4a945802a78d13 (diff)
downloadtoolchain-utils-24846b19591ca4fb1d03d0c80a2e86effc55c0f6.tar.gz
Update to use "working" version of perf for now.
This is a temporary fix, until we can figure out why the 'normal' version of 'perf' is not properly symbolizing ChromeOS perf data. This CL commits a version of the 'perf' binary (based on perf 3.13) that does properly symbolize ChromeOS perf data files. It also updates crosperf to copy this working perf binary into the chroot (in /tmp) and to use it when generating the perf report. Work to track down and fix the real problem is ongoing, but in the meantime this allows Crosperf users to get meaningful perf reports for ChromeOS. BUG=None TEST=Tested Crosperf using this patch and generating perf reports. Change-Id: Ia8dd157b88d37a897eb9becf8fa444de41e88873 Reviewed-on: https://chrome-internal-review.googlesource.com/157756 Reviewed-by: Caroline Tice <cmtice@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
Diffstat (limited to 'crosperf/results_cache.py')
-rw-r--r--crosperf/results_cache.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/crosperf/results_cache.py b/crosperf/results_cache.py
index fcb86ae3..6239324f 100644
--- a/crosperf/results_cache.py
+++ b/crosperf/results_cache.py
@@ -253,6 +253,21 @@ class Result(object):
if os.path.exists(perf_path):
perf_file = "/usr/bin/perf"
+ # The following is a hack, to use the perf.static binary that
+ # was given to us by Stephane Eranian, until he can figure out
+ # why "normal" perf cannot properly symbolize ChromeOS perf.data files.
+ # Get the directory containing the 'crosperf' script.
+ dirname, _ = misc.GetRoot(sys.argv[0])
+ perf_path = os.path.join (dirname, "..", "perf.static")
+ if os.path.exists(perf_path):
+ # copy the executable into the chroot so that it can be found.
+ src_path = perf_path
+ dst_path = os.path.join (self._chromeos_root, "chroot",
+ "tmp/perf.static")
+ command = "cp %s %s" % (src_path,dst_path)
+ self._ce.RunCommand (command)
+ perf_file = "/tmp/perf.static"
+
command = ("%s report "
"-n "
"--symfs /build/%s "