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

Side by Side Diff: tools/profile_chrome/perf_controller.py

Issue 402803005: Move adb_profile_chrome to profile_chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/profile_chrome/main.py ('k') | tools/profile_chrome/perf_controller_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import os 6 import os
7 import subprocess 7 import subprocess
8 import sys 8 import sys
9 import tempfile 9 import tempfile
10 10
11 from adb_profile_chrome import controllers 11 from profile_chrome import controllers
12 from adb_profile_chrome import ui 12 from profile_chrome import ui
13 13
14 from pylib import android_commands 14 from pylib import android_commands
15 from pylib import constants 15 from pylib import constants
16 from pylib.perf import perf_control 16 from pylib.perf import perf_control
17 17
18 sys.path.append(os.path.join(constants.DIR_SOURCE_ROOT, 18 sys.path.append(os.path.join(constants.DIR_SOURCE_ROOT,
19 'tools', 19 'tools',
20 'telemetry')) 20 'telemetry'))
21 try: 21 try:
22 # pylint: disable=F0401 22 # pylint: disable=F0401
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 open(json_file_name, 'w') as json_file: 178 open(json_file_name, 'w') as json_file:
179 cmd = [perfhost_path, 'script', '-s', perf_script_path, '-i', 179 cmd = [perfhost_path, 'script', '-s', perf_script_path, '-i',
180 perf_profile, '--symfs', symfs_dir, '--kallsyms', kallsyms] 180 perf_profile, '--symfs', symfs_dir, '--kallsyms', kallsyms]
181 if subprocess.call(cmd, stdout=json_file, stderr=dev_null): 181 if subprocess.call(cmd, stdout=json_file, stderr=dev_null):
182 logging.warning('Perf data to JSON conversion failed. The result will ' 182 logging.warning('Perf data to JSON conversion failed. The result will '
183 'not contain any perf samples. You can still view the ' 183 'not contain any perf samples. You can still view the '
184 'perf data manually as shown above.') 184 'perf data manually as shown above.')
185 return None 185 return None
186 186
187 return json_file_name 187 return json_file_name
OLDNEW
« no previous file with comments | « tools/profile_chrome/main.py ('k') | tools/profile_chrome/perf_controller_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698