Commit Graph

15 Commits

Author SHA1 Message Date
Andreas Gampe
3d97a46124 Stack: Add symbol caching
Add symbol caching to the stack tool. This caches resolved symbols,
improving symbolization speed for (sets of) stack traces with duplicated
symbols.

Bug: 38226236
Test: m
Test: manual tests
Change-Id: Ia579234ba1bf227b12af0c5af5fa3955d0eed4fe
2017-05-17 15:14:07 -07:00
Christopher Ferris
5f1b4f0d9e Skip adding value lines for accidental matches.
If the value_line regex matches, and the symbol file happens to exist
as a directory, we'd call addr2line and crash. Fix this so that calling
addr2line on a directory doesn't happen.

There isn't an easy way to test this, but I added a single new unit test. The
real test was to use a tombstone file that used to crash, but no longer crashes.

Test: Wrote new unit test, ran over a tombstone file that used to crash.
Change-Id: I4331e3b032cee8d697d1b7f409638750c61971d6
2016-09-19 13:24:37 -07:00
Christopher Ferris
5b820ba6c9 Handle asan lines when determing abi.
Change-Id: I553bded15e76ecb1ffc7bc3eadcee198301e0a67
2016-09-09 10:54:45 -07:00
Christopher Ferris
bf8a940234 Find abi before trying to decode the stack.
The CallStack function prints stacks to the log. Unfortunately, our
stack script defaults to arm, so if the data is actually arm64, we'll
do nothing. Modify the script to parse the input trying to determine
the abi before processing the rest of the lines. At the very least,
we'll be able to correctly choose between arm and arm64.

The only downside, is that, the old method could take dumps from different
abis, but no one I know does this.

Bug: 26569638
Change-Id: I5935b82fe0af1e788b0d3edc535b9f0cbb7d1b28
2016-03-15 16:25:19 -07:00
Christopher Ferris
ece64c4bd5 Update the stack script for apk handling.
The dlopen of a shared library within an apk is not handled by
the stack tool. Modify to understand and search through the apk to
find the shared library associated with the offset. Then unzip
that shared library to use as the target of addr2line.

Change-Id: I404302f68dff45c35a1dc2a55547f42ea04f02bf
2015-09-04 10:51:22 -07:00
Yang Ni
e4b2a1a959 Made development/scripts/stack work on Mac.
Change-Id: I9be1e50c0a635068017326738af4f5c38dddddab
2014-11-07 09:45:56 -08:00
Elliott Hughes
c3c8619579 Make 'stack' able to find toolchains regardless of lunch.
This is needed by the internal stack decoding website, which
will be pulling symbols from the build servers anyway (so doesn't
need to be correctly lunched).

Bug: 16734486
Change-Id: I9190065148c0d4bb4eacec28bcc062fa95798917
2014-08-29 13:49:57 -07:00
Elliott Hughes
c3166bec1c Fix symbol.py's toolchain detection for x86.
x86 uses the x86_64 toolchain. There's no separate 32-bit toolchain.

I started to refactor so we could add FindToolchain tests, but that doesn't
work because FindToolchain depends on environment variables set up by 'lunch'.

Change-Id: I264b95e1e83a7e795f8cac49bc9e1cf497514029
2014-07-07 15:18:01 -07:00
Elliott Hughes
1ba94df0c9 Fix FindToolchain for mips.
Change-Id: Ib2689e24065e9d5a0c249a26c63e6493327fc0b1
2014-07-01 12:22:06 -07:00
Elliott Hughes
0836593b85 Use ANDROID_TOOLCHAIN and ANDROID_TOOLCHAIN_2ND_ARCH in 'stack'.
This fixes the bug where we can't (currently) find the toolchain
for arm because it's at a different GCC version (4.8) from arm64 (4.9).

Change-Id: I22351af55298255f3ac4adfcae7e20080712fba4
2014-06-16 10:40:22 -07:00
Brigid Smith
45a46c6138 Updating stack_core.py to recognize new ABI output from debuggerd.
Change-Id: Ib9736a0509edb97be15f5e89dbc3a5188e744416
2014-06-13 17:43:38 -07:00
Narayan Kamath
9649700787 Fix the stack/ tool for 64 bit archs.
pc values might now be 16 bytes wide. Also add support
for the arm64 architecture switch.

Change-Id: Ia2e0282f3bee03ef6092de285b0c32fa6da07cb0
2014-04-14 11:07:37 +01:00
Ben Cheng
b42dad0dee Clean up the stack trace symbolization tool.
Change-Id: Id71cacde653a5c1c92a028ee80f5aa8264e1963a
2013-04-25 15:34:14 -07:00
Romain Guy
fdc3519cd7 Fix stack tool to find the correct toolchain
Change-Id: Ie525b286a4d133512c72b234f03e54f8635c15ee
2012-11-30 14:56:39 -08:00
Iliyan Malchev
4929d6a562 development: copy stack tool over from vendor/google/tools
The stack tool is not really proprietary, and is needed by vendors and
third-party developers working on native code.

Change-Id: I37f34b0681a0063ecf71f5a078d2c4a1ba622973
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-08-04 17:44:40 -07:00