OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 re | 7 import re |
8 import signal | 8 import signal |
9 import subprocess | 9 import subprocess |
10 import sys | 10 import sys |
11 import tempfile | 11 import tempfile |
12 | 12 |
13 from pylib.device import device_errors # pylint: disable=F0401 | 13 from devil.android import device_errors # pylint: disable=F0401 |
14 | 14 |
15 from telemetry.internal.util import binary_manager | 15 from telemetry.internal.util import binary_manager |
16 from telemetry.core import platform | 16 from telemetry.core import platform |
17 from telemetry.internal.platform import profiler | 17 from telemetry.internal.platform import profiler |
18 from telemetry.internal.platform.profiler import android_profiling_helper | 18 from telemetry.internal.platform.profiler import android_profiling_helper |
19 | 19 |
20 from pylib.perf import perf_control # pylint: disable=F0401 | 20 from pylib.perf import perf_control # pylint: disable=F0401 |
21 | 21 |
22 | 22 |
23 _PERF_OPTIONS = [ | 23 _PERF_OPTIONS = [ |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 if len(fields) != 5: | 248 if len(fields) != 5: |
249 continue | 249 continue |
250 period = int(fields[1]) | 250 period = int(fields[1]) |
251 function = fields[4].partition(' ')[2] | 251 function = fields[4].partition(' ')[2] |
252 function = re.sub('<.*>', '', function) # Strip template params. | 252 function = re.sub('<.*>', '', function) # Strip template params. |
253 function = re.sub('[(].*[)]', '', function) # Strip function params. | 253 function = re.sub('[(].*[)]', '', function) # Strip function params. |
254 period_by_function[function] = period | 254 period_by_function[function] = period |
255 if len(period_by_function) == number: | 255 if len(period_by_function) == number: |
256 break | 256 break |
257 return period_by_function | 257 return period_by_function |
OLD | NEW |