Merge "Make the "stack" script work for device tests." am: ea6686f701

Original change: https://android-review.googlesource.com/c/platform/development/+/1606479

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia9decdca40272066e107fbc095dfeb2bb546c9a7
This commit is contained in:
Krzysztof Kosiński
2021-03-12 05:32:29 +00:00
committed by Automerger Merge Worker

View File

@@ -391,6 +391,17 @@ class TraceConverter:
lib = area lib = area
lib_name = None lib_name = None
# When using atest, test paths are different between the out/ directory
# and device. Apply fixups.
if lib.startswith("/data/local/tests/") or lib.startswith("/data/local/tmp/"):
test_name = lib.rsplit("/", 1)[-1]
prefix = "/data/nativetest"
if symbol.ARCH.endswith("64"):
prefix += "64"
if lib.startswith("/data/local/tests/vendor/"):
prefix += "/vendor"
lib = prefix + "/" + test_name + "/" + test_name
# If a calls b which further calls c and c is inlined to b, we want to # If a calls b which further calls c and c is inlined to b, we want to
# display "a -> b -> c" in the stack trace instead of just "a -> c" # display "a -> b -> c" in the stack trace instead of just "a -> c"
info = symbol.SymbolInformation(lib, code_addr) info = symbol.SymbolInformation(lib, code_addr)