9879137720
1. Extend MAX_BACKTRACE_FRAMES to 256, as we can have callchains with length near 256 when recording Android applications. 2. .eh_frame and .ARM.exidx doesn't know how to unwind from instructions setting up or destroying stack frames. It can lead to wrong callchains, which may contain pcs outside executable mapping areas. Stop unwinding once this is detected. 3. Some CIE entries in .eh_frame/.debug_frame suggest unwinder reading personality routine from memory. However, that is not available in offline unwinding, and leads to ACCESS_MEM_FAILED error. Work around this by returning all zero data when failed to read data for some addresses. 4. Some libraries have empty .eh_frame_hdr but valid .eh_frame. Work around this by building eh_frame_hdr manually. 5. Prefer to use .debug_frame than .eh_frame. Because the former can unwind instructions setting up and destroying stack frames. Bug: http://b/69383534 Test: run backtrace_test. Test: run simpleperf on some apps. Change-Id: I62dddda3865dd567c6be150ce5527dc2d3516256 |
||
---|---|---|
.. | ||
include/backtrace | ||
testdata | ||
.clang-format | ||
Android.bp | ||
Backtrace.cpp | ||
backtrace_benchmarks.cpp | ||
backtrace_offline_test.cpp | ||
backtrace_read_benchmarks.cpp | ||
backtrace_test.cpp | ||
backtrace_testlib.cpp | ||
backtrace_testlib.h | ||
BacktraceAsyncSafeLog.h | ||
BacktraceCurrent.cpp | ||
BacktraceCurrent.h | ||
BacktraceLog.h | ||
BacktraceMap.cpp | ||
BacktraceOffline.cpp | ||
BacktraceOffline.h | ||
BacktracePtrace.cpp | ||
BacktracePtrace.h | ||
GetPss.cpp | ||
GetPss.h | ||
OWNERS | ||
thread_utils.c | ||
thread_utils.h | ||
ThreadEntry.cpp | ||
ThreadEntry.h | ||
UnwindCurrent.cpp | ||
UnwindCurrent.h | ||
UnwindMap.cpp | ||
UnwindMap.h | ||
UnwindPtrace.cpp | ||
UnwindPtrace.h | ||
UnwindStack.cpp | ||
UnwindStack.h | ||
UnwindStackMap.cpp | ||
UnwindStackMap.h |