Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: client/profilers/perf/perf.py

Issue 6883035: Merge remote branch 'autotest-upstream/master' into autotest-merge (Closed) Base URL: ssh://gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/common_lib/base_packages.py ('k') | client/tests/kvm/autotest_control/flail.control » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/profilers/perf/perf.py
diff --git a/client/profilers/perf/perf.py b/client/profilers/perf/perf.py
index 211d562bdaea058341afad4fcbda3b65ec0e3664..e6f9bb71afd441cf1b42e416087e476b0d1b629f 100644
--- a/client/profilers/perf/perf.py
+++ b/client/profilers/perf/perf.py
@@ -13,8 +13,11 @@ from autotest_lib.client.bin import profiler, os_dep, utils
class perf(profiler.profiler):
version = 1
- def initialize(self, events="cycles,instructions"):
- self.events = events
+ def initialize(self, events=["cycles","instructions"]):
+ if type(events) == str:
+ self.events = [events]
+ else:
+ self.events = events
self.perf_bin = os_dep.command('perf')
perf_help = utils.run('%s report help' % self.perf_bin,
ignore_status=True).stderr
@@ -31,8 +34,10 @@ class perf(profiler.profiler):
def start(self, test):
self.logfile = os.path.join(test.profdir, "perf")
- cmd = ("%s record -a -o %s -e %s" %
- (self.perf_bin, self.logfile, self.events))
+ cmd = ("%s record -a -o %s" %
+ (self.perf_bin, self.logfile))
+ for event in self.events:
+ cmd += " -e %s" % event
truty1 2011/04/20 17:36:42 This is a change to the perf bin interface. I hop
self._process = subprocess.Popen(cmd, shell=True,
stderr=subprocess.STDOUT)
« no previous file with comments | « client/common_lib/base_packages.py ('k') | client/tests/kvm/autotest_control/flail.control » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698