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

Side by Side Diff: build/android/tombstones.py

Issue 404993004: [Android] Switch to DeviceUtils versions of GetMemoryUsageForPid and __str__. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comment from frankf 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
OLDNEW
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.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return ret 143 return ret
144 144
145 # Sort the tombstones in date order, descending 145 # Sort the tombstones in date order, descending
146 all_tombstones.sort(cmp=lambda a, b: cmp(b[1], a[1])) 146 all_tombstones.sort(cmp=lambda a, b: cmp(b[1], a[1]))
147 147
148 # Only resolve the most recent unless --all-tombstones given. 148 # Only resolve the most recent unless --all-tombstones given.
149 tombstones = all_tombstones if options.all_tombstones else [all_tombstones[0]] 149 tombstones = all_tombstones if options.all_tombstones else [all_tombstones[0]]
150 150
151 device_now = _GetDeviceDateTime(device) 151 device_now = _GetDeviceDateTime(device)
152 for tombstone_file, tombstone_time in tombstones: 152 for tombstone_file, tombstone_time in tombstones:
153 ret += [{'serial': device.old_interface.Adb().GetSerialNumber(), 153 ret += [{'serial': str(device),
154 'device_now': device_now, 154 'device_now': device_now,
155 'time': tombstone_time, 155 'time': tombstone_time,
156 'file': tombstone_file, 156 'file': tombstone_file,
157 'stack': options.stack, 157 'stack': options.stack,
158 'data': _GetTombstoneData(device, tombstone_file)}] 158 'data': _GetTombstoneData(device, tombstone_file)}]
159 159
160 # Erase all the tombstones if desired. 160 # Erase all the tombstones if desired.
161 if options.wipe_tombstones: 161 if options.wipe_tombstones:
162 for tombstone_file, _ in all_tombstones: 162 for tombstone_file, _ in all_tombstones:
163 _EraseTombstone(device, tombstone_file) 163 _EraseTombstone(device, tombstone_file)
(...skipping 25 matching lines...) Expand all
189 189
190 tombstones = [] 190 tombstones = []
191 for device_serial in devices: 191 for device_serial in devices:
192 device = device_utils.DeviceUtils(device_serial) 192 device = device_utils.DeviceUtils(device_serial)
193 tombstones += _GetTombstonesForDevice(device, options) 193 tombstones += _GetTombstonesForDevice(device, options)
194 194
195 _ResolveTombstones(options.jobs, tombstones) 195 _ResolveTombstones(options.jobs, tombstones)
196 196
197 if __name__ == '__main__': 197 if __name__ == '__main__':
198 sys.exit(main()) 198 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/pylib/valgrind_tools.py ('k') | tools/memory_inspector/memory_inspector/backends/android/android_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698