| OLD | NEW |
| 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 os | 5 import os |
| 6 | 6 |
| 7 from chrome_profiler import trace_packager | 7 from adb_profile_chrome import trace_packager |
| 8 from chrome_profiler import ui | 8 from adb_profile_chrome import ui |
| 9 | 9 |
| 10 from pylib import constants | 10 from pylib import constants |
| 11 | 11 |
| 12 | 12 |
| 13 def _StartTracing(controllers, interval): | 13 def _StartTracing(controllers, interval): |
| 14 for controller in controllers: | 14 for controller in controllers: |
| 15 controller.StartTracing(interval) | 15 controller.StartTracing(interval) |
| 16 | 16 |
| 17 | 17 |
| 18 def _StopTracing(controllers): | 18 def _StopTracing(controllers): |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 else: | 74 else: |
| 75 ui.PrintMessage('Capturing %s. Press Enter to stop...' % \ | 75 ui.PrintMessage('Capturing %s. Press Enter to stop...' % \ |
| 76 trace_type, eol='') | 76 trace_type, eol='') |
| 77 raw_input() | 77 raw_input() |
| 78 finally: | 78 finally: |
| 79 _StopTracing(controllers) | 79 _StopTracing(controllers) |
| 80 if interval: | 80 if interval: |
| 81 ui.PrintMessage('done') | 81 ui.PrintMessage('done') |
| 82 | 82 |
| 83 return _PullTraces(controllers, output, compress, write_json) | 83 return _PullTraces(controllers, output, compress, write_json) |
| OLD | NEW |