diff options
author | sievers@google.com <sievers@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-11 01:28:54 +0000 |
---|---|---|
committer | sievers@google.com <sievers@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-11 01:28:54 +0000 |
commit | d6d3c7f27ae400b02f213ae7f6c518af214af7a1 (patch) | |
tree | f3e57f9bb61e3fde217dcc68947ba74ac74cbed5 /build/android | |
parent | 93b1c4e979784d6741cad83cedbc2405878b0ecf (diff) | |
download | chromium_src-d6d3c7f27ae400b02f213ae7f6c518af214af7a1.zip chromium_src-d6d3c7f27ae400b02f213ae7f6c518af214af7a1.tar.gz chromium_src-d6d3c7f27ae400b02f213ae7f6c518af214af7a1.tar.bz2 |
Android: Fix default filename for kTraceStartup file
Putting chrometrace.log in the current working directory is not
useful on Android. Generate a filepath on the sdcard instead the
same way we do it for intent triggered tracing.
R=piman@chromium.org, wangxianzhu@chromium.org
Review URL: https://codereview.chromium.org/232053002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263153 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android')
-rwxr-xr-x | build/android/adb_profile_chrome.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/build/android/adb_profile_chrome.py b/build/android/adb_profile_chrome.py index ae69cbe..37f250c 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. |