| 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 threading | 5 import threading |
| 6 import zlib | 6 import zlib |
| 7 | 7 |
| 8 from adb_profile_chrome import controllers | 8 from profile_chrome import controllers |
| 9 from adb_profile_chrome import util | 9 from profile_chrome import util |
| 10 | 10 |
| 11 from pylib import cmd_helper | 11 from pylib import cmd_helper |
| 12 | 12 |
| 13 | 13 |
| 14 _SYSTRACE_OPTIONS = [ | 14 _SYSTRACE_OPTIONS = [ |
| 15 # Compress the trace before sending it over USB. | 15 # Compress the trace before sending it over USB. |
| 16 '-z', | 16 '-z', |
| 17 # Use a large trace buffer to increase the polling interval. | 17 # Use a large trace buffer to increase the polling interval. |
| 18 '-b', '16384' | 18 '-b', '16384' |
| 19 ] | 19 ] |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 except ValueError: | 86 except ValueError: |
| 87 raise RuntimeError('Systrace start marker not found') | 87 raise RuntimeError('Systrace start marker not found') |
| 88 trace_data = trace_data[trace_start + 6:] | 88 trace_data = trace_data[trace_start + 6:] |
| 89 | 89 |
| 90 # Collapse CRLFs that are added by adb shell. | 90 # Collapse CRLFs that are added by adb shell. |
| 91 if trace_data.startswith('\r\n'): | 91 if trace_data.startswith('\r\n'): |
| 92 trace_data = trace_data.replace('\r\n', '\n') | 92 trace_data = trace_data.replace('\r\n', '\n') |
| 93 | 93 |
| 94 # Skip the initial newline. | 94 # Skip the initial newline. |
| 95 return trace_data[1:] | 95 return trace_data[1:] |
| OLD | NEW |