Chromium Code Reviews| Index: tools/run_perf.py |
| diff --git a/tools/run_perf.py b/tools/run_perf.py |
| index 31331686fa0f0598b1de48ddc4f4b221e21f158e..d2a0f6040095982fcab5e5ad8948cfb396334402 100755 |
| --- a/tools/run_perf.py |
| +++ b/tools/run_perf.py |
| @@ -102,6 +102,7 @@ import math |
| import optparse |
| import os |
| import re |
| +import subprocess |
| import sys |
| from testrunner.local import commands |
| @@ -458,6 +459,8 @@ class RunnableConfig(GraphConfig): |
| def GetCommand(self, shell_dir, extra_flags=None): |
| # TODO(machenbach): This requires +.exe if run on windows. |
|
Michael Achenbach
2015/09/14 10:24:10
Please add one line in the beginning of this metho
gdeepti1
2015/09/14 19:46:05
Done.
|
| cmd = [os.path.join(shell_dir, self.binary)] |
| + if self.binary != 'd8' and '--prof' in self.extra_flags: |
| + print "Profiler supported only on a benchmark run with d8" |
| return cmd + self.GetCommandFlags(extra_flags=extra_flags) |
| def Run(self, runner, trybot): |
| @@ -640,6 +643,19 @@ class DesktopPlatform(Platform): |
| print output.stderr |
| 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: |
| + print "Profiler option currently supported on Linux and Mac OS." |
| + prof_cmd = tick_tools + " --only-summary" |
| + subprocess.check_call(prof_cmd, shell=True) |
| return output.stdout |