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

Unified Diff: tools/run_perf.py

Issue 1327033003: [test] Add an option to the perf runner to support running with the internal profiler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Michael's comment 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 | no next file » | no next file with comments »
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 31331686fa0f0598b1de48ddc4f4b221e21f158e..a747b925b3daf0a4e046731d6a2bcd8dce93e19c 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
@@ -457,7 +458,10 @@ class RunnableConfig(GraphConfig):
def GetCommand(self, shell_dir, extra_flags=None):
# 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:03:40 Ah crap - didn't catch this. s/self.extra_flags/ex
+ 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 +644,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"
Michael Achenbach 2015/09/15 07:03:40 In the else case, tick_tools is read before assign
+ subprocess.check_call(prof_cmd, shell=True)
return output.stdout
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698