OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2013 The Chromium Authors. All rights reserved. | 3 # Copyright 2013 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 # | 6 # |
7 # Find the most recent tombstone file(s) on all connected devices | 7 # Find the most recent tombstone file(s) on all connected devices |
8 # and prints their stacks. | 8 # and prints their stacks. |
9 # | 9 # |
10 # Assumes tombstone file was created with current symbols. | 10 # Assumes tombstone file was created with current symbols. |
11 | 11 |
12 import datetime | 12 import datetime |
13 import itertools | 13 import itertools |
14 import logging | 14 import logging |
15 import multiprocessing | 15 import multiprocessing |
16 import os | 16 import os |
17 import re | 17 import re |
18 import subprocess | 18 import subprocess |
19 import sys | 19 import sys |
20 import optparse | 20 import optparse |
21 | 21 |
22 from pylib.device import adb_wrapper | 22 from devil.android import device_blacklist |
23 from pylib.device import device_blacklist | 23 from devil.android import device_errors |
24 from pylib.device import device_errors | 24 from devil.android import device_utils |
25 from pylib.device import device_utils | 25 from devil.android.sdk import adb_wrapper |
26 from pylib.utils import run_tests_helper | 26 from devil.utils import run_tests_helper |
27 | 27 |
28 | 28 |
29 _TZ_UTC = {'TZ': 'UTC'} | 29 _TZ_UTC = {'TZ': 'UTC'} |
30 | 30 |
31 def _ListTombstones(device): | 31 def _ListTombstones(device): |
32 """List the tombstone files on the device. | 32 """List the tombstone files on the device. |
33 | 33 |
34 Args: | 34 Args: |
35 device: An instance of DeviceUtils. | 35 device: An instance of DeviceUtils. |
36 | 36 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 # http://bugs.python.org/issue7980 | 252 # http://bugs.python.org/issue7980 |
253 tombstones = [] | 253 tombstones = [] |
254 for device in devices: | 254 for device in devices: |
255 tombstones += _GetTombstonesForDevice(device, options) | 255 tombstones += _GetTombstonesForDevice(device, options) |
256 | 256 |
257 _ResolveTombstones(options.jobs, tombstones) | 257 _ResolveTombstones(options.jobs, tombstones) |
258 | 258 |
259 | 259 |
260 if __name__ == '__main__': | 260 if __name__ == '__main__': |
261 sys.exit(main()) | 261 sys.exit(main()) |
OLD | NEW |