summaryrefslogtreecommitdiffstats
path: root/tools/android/adb_profile_chrome/perf_controller.py
diff options
context:
space:
mode:
authorskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-13 21:53:30 +0000
committerskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-13 21:53:30 +0000
commit3579f8fba28dc636dce1bb648574718d82bac3b8 (patch)
tree530f70d4ec2019760bf1061ba28c16ae86899367 /tools/android/adb_profile_chrome/perf_controller.py
parent59828d3af3f80d5d88c669f58a731a0283864d12 (diff)
downloadchromium_src-3579f8fba28dc636dce1bb648574718d82bac3b8.zip
chromium_src-3579f8fba28dc636dce1bb648574718d82bac3b8.tar.gz
chromium_src-3579f8fba28dc636dce1bb648574718d82bac3b8.tar.bz2
Make perf work in adb_profile_chrome when JSON converter isn't present
When the JSON converter isn't present, the user can still manually inspect perf recordings. BUG=375754 TEST=tools/android/adb_profile_chrome/run_tests Review URL: https://codereview.chromium.org/337543002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277095 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/android/adb_profile_chrome/perf_controller.py')
-rw-r--r--tools/android/adb_profile_chrome/perf_controller.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/android/adb_profile_chrome/perf_controller.py b/tools/android/adb_profile_chrome/perf_controller.py
index 96a077d..064300d 100644
--- a/tools/android/adb_profile_chrome/perf_controller.py
+++ b/tools/android/adb_profile_chrome/perf_controller.py
@@ -182,5 +182,10 @@ class PerfProfilerController(controllers.BaseController):
open(json_file_name, 'w') as json_file:
cmd = [perfhost_path, 'script', '-s', perf_script_path, '-i',
perf_profile, '--symfs', symfs_dir, '--kallsyms', kallsyms]
- subprocess.call(cmd, stdout=json_file, stderr=dev_null)
+ if subprocess.call(cmd, stdout=json_file, stderr=dev_null):
+ logging.warning('Perf data to JSON conversion failed. The result will '
+ 'not contain any perf samples. You can still view the '
+ 'perf data manually as shown above.')
+ return None
+
return json_file_name