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

Unified Diff: build/android/tombstones.py

Issue 416983004: Add arch support for tombstone.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rework based on jbudorick's comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/tombstones.py
diff --git a/build/android/tombstones.py b/build/android/tombstones.py
index 3c1624bab263567f10f0289d679fede824acf70d..ebe1bf8bebe56b52ad7ccf990f47d2dafb638d0b 100755
--- a/build/android/tombstones.py
+++ b/build/android/tombstones.py
@@ -76,12 +76,13 @@ def _EraseTombstone(device, tombstone_file):
'rm /data/tombstones/' + tombstone_file, as_root=True)
-def _ResolveSymbols(tombstone_data, include_stack):
+def _ResolveSymbols(tombstone_data, include_stack, arch):
"""Run the stack tool for given tombstone input.
Args:
tombstone_data: a list of strings of tombstone data.
include_stack: boolean whether to include stack data in output.
+ arch: the device architecture of tombstone data.
Yields:
A string for each line of resolved stack output.
@@ -89,7 +90,7 @@ def _ResolveSymbols(tombstone_data, include_stack):
stack_tool = os.path.join(os.path.dirname(__file__), '..', '..',
'third_party', 'android_platform', 'development',
'scripts', 'stack')
- proc = subprocess.Popen(stack_tool, stdin=subprocess.PIPE,
+ proc = subprocess.Popen([stack_tool, '--arch', arch], stdin=subprocess.PIPE,
stdout=subprocess.PIPE)
output = proc.communicate(input='\n'.join(tombstone_data))[0]
for line in output.split('\n'):
@@ -106,7 +107,8 @@ def _ResolveTombstone(tombstone):
' Device: ' + tombstone['serial'])]
print '\n'.join(lines)
print 'Resolving...'
- lines += _ResolveSymbols(tombstone['data'], tombstone['stack'])
+ lines += _ResolveSymbols(tombstone['data'], tombstone['stack'],
+ tombstone['arch'])
return lines
@@ -151,6 +153,7 @@ def _GetTombstonesForDevice(device, options):
device_now = _GetDeviceDateTime(device)
for tombstone_file, tombstone_time in tombstones:
ret += [{'serial': str(device),
+ 'arch': device.GetProp('ro.product.cpu.abi'),
'device_now': device_now,
'time': tombstone_time,
'file': tombstone_file,
@@ -164,6 +167,7 @@ def _GetTombstonesForDevice(device, options):
return ret
+
def main():
parser = optparse.OptionParser()
parser.add_option('--device',
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698