Perfprofd: Fix missing symbol crash in stack script
It is possible we will not find a symbol for a frame in the backtrace.
Do not crash, print '???' instead.
Test: mmma system/extras/perfprofd
Test: manual
Change-Id: Ic91907c2f38adcbbd5979b7d1533df642ce763b3
diff --git a/perfprofd/scripts/perf_proto_stack.py b/perfprofd/scripts/perf_proto_stack.py
index bcf8e06..4a576b4 100644
--- a/perfprofd/scripts/perf_proto_stack.py
+++ b/perfprofd/scripts/perf_proto_stack.py
@@ -72,7 +72,11 @@
print indent(object_symbol_with_offset, 4)
if source_symbol is not None:
for (sym_inlined, loc_inlined, _) in info:
- print indent(sym_inlined, 5)
+ # TODO: Figure out what's going on here:
+ if sym_inlined is not None:
+ print indent(sym_inlined, 5)
+ else:
+ print indent('???', 5)
if loc_inlined is not None:
print ' %s' % (indent(loc_inlined, 5))
elif module_descr.symbol and (addr_rel & 0x8000000000000000 != 0):