aboutsummaryrefslogtreecommitdiff
path: root/crosperf/results_cache.py
diff options
context:
space:
mode:
authorcmtice <cmtice@google.com>2014-03-03 11:06:37 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-03-05 01:46:49 +0000
commit32f09363f80eb73ba1a22bd90d6e609e8f991c8f (patch)
tree152a144827fa462fc90b1e95289be5fad7ff94fb /crosperf/results_cache.py
parent0cc4e7790afbd514675801a1ffb90517c147270f (diff)
downloadtoolchain-utils-32f09363f80eb73ba1a22bd90d6e609e8f991c8f.tar.gz
Fix problem with looking for 'perf' in the wrong directory.
BUG=None TEST=Tested with old and new chroots; seems to work. Change-Id: Id1a7fc9d6b1dea0b96fe51032bb25d4722dd8b48 Reviewed-on: https://chrome-internal-review.googlesource.com/156381 Reviewed-by: Yunlian Jiang <yunlian@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.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/crosperf/results_cache.py b/crosperf/results_cache.py
index fb66e5c4..3c644d00 100644
--- a/crosperf/results_cache.py
+++ b/crosperf/results_cache.py
@@ -243,14 +243,23 @@ class Result(object):
perf_report_file)
chroot_perf_report_file = misc.GetInsideChrootPath(self._chromeos_root,
perf_report_file)
- command = ("/usr/sbin/perf report "
+ perf_path = os.path.join (self._chromeos_root,
+ "chroot",
+ "usr/bin/perf")
+
+ perf_file = "/usr/sbin/perf"
+ if os.path.exists(perf_path):
+ perf_file = "/usr/bin/perf"
+
+ command = ("%s report "
"-n "
"--symfs /build/%s "
"--vmlinux /build/%s/usr/lib/debug/boot/vmlinux "
"--kallsyms /build/%s/boot/System.map-* "
"-i %s --stdio "
"> %s" %
- (self._board,
+ (perf_file,
+ self._board,
self._board,
self._board,
chroot_perf_data_file,