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

Unified Diff: tools/run_perf.py

Issue 1341213002: [test] More robust perf runner with profiler option. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | tools/unittests/run_perf_test.py » ('j') | tools/unittests/run_perf_test.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/run_perf.py
diff --git a/tools/run_perf.py b/tools/run_perf.py
index a747b925b3daf0a4e046731d6a2bcd8dce93e19c..a8cc3fab7158207f73d5ae460b0f291360a76219 100755
--- a/tools/run_perf.py
+++ b/tools/run_perf.py
@@ -121,6 +121,7 @@ SUPPORTED_ARCHS = ["arm",
GENERIC_RESULTS_RE = re.compile(r"^RESULT ([^:]+): ([^=]+)= ([^ ]+) ([^ ]*)$")
RESULT_STDDEV_RE = re.compile(r"^\{([^\}]+)\}$")
RESULT_LIST_RE = re.compile(r"^\[([^\]]+)\]$")
+TOOLS_BASE = os.path.abspath(os.path.dirname(__file__))
def LoadAndroidBuildTools(path): # pragma: no cover
@@ -460,7 +461,7 @@ class RunnableConfig(GraphConfig):
# TODO(machenbach): This requires +.exe if run on windows.
extra_flags = extra_flags or []
cmd = [os.path.join(shell_dir, self.binary)]
- if self.binary != 'd8' and '--prof' in self.extra_flags:
Michael Achenbach 2015/09/15 07:28:35 Fix after https://codereview.chromium.org/13270330
+ if self.binary != 'd8' and '--prof' in extra_flags:
print "Profiler supported only on a benchmark run with d8"
return cmd + self.GetCommandFlags(extra_flags=extra_flags)
@@ -645,18 +646,12 @@ class DesktopPlatform(Platform):
if output.timed_out:
print ">>> Test timed out after %ss." % runnable.timeout
if '--prof' in self.extra_flags:
- if utils.GuessOS() == "linux":
- tick_tools = os.path.abspath(os.path.join(shell_dir, "..", "..",
- "tools",
- "linux-tick-processor"))
- elif utils.GuessOS() == "macos":
- tick_tools = os.path.abspath(os.path.join(shell_dir, "..", "..",
- "tools",
- "mac-tick-processor"))
- else:
+ os_prefix = {"linux": "linux", "macos": "mac"}.get(utils.GuessOS())
+ if os_prefix:
+ tick_tools = os.path.join(TOOLS_BASE, "%s-tick-processor" % os_prefix)
+ subprocess.check_call(tick_tools + " --only-summary", shell=True)
+ else: # pragma: no cover
print "Profiler option currently supported on Linux and Mac OS."
Michael Achenbach 2015/09/15 07:28:35 Fix after https://codereview.chromium.org/13270330
- prof_cmd = tick_tools + " --only-summary"
- subprocess.check_call(prof_cmd, shell=True)
return output.stdout
« no previous file with comments | « no previous file | tools/unittests/run_perf_test.py » ('j') | tools/unittests/run_perf_test.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698