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

Unified Diff: build/android/adb_profile_chrome.py

Issue 232053002: Android: Fix default filename for kTraceStartup file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 6 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
Index: build/android/adb_profile_chrome.py
diff --git a/build/android/adb_profile_chrome.py b/build/android/adb_profile_chrome.py
index ae69cbe772d253e1938abe1c363a29a851dbbd79..37f250c19a2b4b9c38c0e2cb1f87cf96b4406d13 100755
--- a/build/android/adb_profile_chrome.py
+++ b/build/android/adb_profile_chrome.py
@@ -45,7 +45,7 @@ class ChromeTracingController(object):
self._trace_file = None
self._trace_interval = None
self._trace_start_re = \
- re.compile(r'Logging performance trace to file: (.*)')
+ re.compile(r'Logging performance trace to file')
self._trace_finish_re = \
re.compile(r'Profiler finished[.] Results are in (.*)[.]')
self._device.old_interface.StartMonitoringLogcat(clear=False)
@@ -62,25 +62,24 @@ class ChromeTracingController(object):
'-e continuous' if self._ring_buffer else '')
# Chrome logs two different messages related to tracing:
#
- # 1. "Logging performance trace to file [...]"
+ # 1. "Logging performance trace to file"
# 2. "Profiler finished. Results are in [...]"
#
# The first one is printed when tracing starts and the second one indicates
# that the trace file is ready to be pulled.
try:
- self._trace_file = self._device.old_interface.WaitForLogMatch(
- self._trace_start_re, None, timeout=5).group(1)
+ self._device.old_interface.WaitForLogMatch(
+ self._trace_start_re, None, timeout=5)
except pexpect.TIMEOUT:
raise RuntimeError('Trace start marker not found. Is the correct version '
'of the browser running?')
def StopTracing(self):
- if not self._trace_file:
- return
- self._device.old_interface.BroadcastIntent(self._package_info.package,
- 'GPU_PROFILER_STOP')
- self._device.old_interface.WaitForLogMatch(self._trace_finish_re, None,
- timeout=120)
+ self._device.old_interface.BroadcastIntent(
+ self._package_info.package,
+ 'GPU_PROFILER_STOP')
+ self._trace_file = self._device.old_interface.WaitForLogMatch(
+ self._trace_finish_re, None, timeout=120).group(1)
def PullTrace(self):
# Wait a bit for the browser to finish writing the trace file.
« no previous file with comments | « no previous file | content/browser/android/tracing_controller_android.h » ('j') | content/browser/browser_main_loop.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698