platform_system_core/libbacktrace
Christopher Ferris be788d891d Allow multiple threads sharing a map to unwind.
Add a mutex in MapInfo, and a mutex in Elf. Lock the creation of an Elf
file using the MapInfo mutex, and lock when calling Step, GetFunctionName,
or GetSoname since they can modify information in the object. It might
be beneficial to use a fine grained lock in the future.

Change the Maps object to contain a vector of MapInfo pointers rather
than the total objects. This avoids copying this data around.

Add a test to libbacktrace to verify that sharing a map while doing
unwinds in different threads works.

Add concurrency tests in libunwindstack to verify the locking works.

Add always inline to the RegsGetLocal arm and aarch64 functions. I had
a case where clang did not inline the code, so make sure this is specified.

Bug: 68813077

Test: New unit tests to cover the case. Passes all unit tests.
Test: Ran a monkey test while dumping bugreports and verified that
Test: no crashes in libunwind.
Test: Remove the locking and verified that all of the concurrenty tests fail.
Change-Id: I769e728c676f6bdae9e64ce4cdc03b6749beae03
2017-11-28 15:20:38 -08:00
..
include/backtrace Only skip frames for local unwinds. 2017-11-02 16:22:52 -07:00
testdata Update the tests. 2017-08-28 18:08:52 -07:00
.clang-format Add a 2 width option of clang format. 2017-03-10 13:01:39 -08:00
Android.bp libbacktrace: remove exit time destructors. 2017-10-26 14:20:17 -07:00
Backtrace.cpp Switch libbacktrace new unwinder. 2017-10-30 13:37:50 -07:00
backtrace_benchmarks.cpp Switch libbacktrace new unwinder. 2017-10-30 13:37:50 -07:00
backtrace_offline_test.cpp Update the tests. 2017-08-28 18:08:52 -07:00
backtrace_test.cpp Allow multiple threads sharing a map to unwind. 2017-11-28 15:20:38 -08:00
backtrace_testlib.cpp Test unwinding through a signal handler. 2017-03-23 16:16:02 -07:00
backtrace_testlib.h Test unwinding through a signal handler. 2017-03-23 16:16:02 -07:00
BacktraceAsyncSafeLog.h Use async safe logging in signal handlers. 2017-05-04 17:15:17 -07:00
BacktraceCurrent.cpp Use async safe logging in signal handlers. 2017-05-04 17:15:17 -07:00
BacktraceCurrent.h Allow calling GetFunctionName before unwinding. 2017-03-21 14:21:49 -07:00
BacktraceLog.h liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
BacktraceMap.cpp liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
BacktraceOffline.cpp libbacktraceoffline: make it thread-safe. 2017-02-13 10:35:06 -08:00
BacktraceOffline.h libbacktrace_offline: support .ARM.exidx. 2016-12-07 10:25:33 -08:00
BacktracePtrace.cpp Revert "Use process_vm_readv to read memory." 2016-11-10 23:19:30 +00:00
BacktracePtrace.h Allow calling GetFunctionName before unwinding. 2017-03-21 14:21:49 -07:00
GetPss.cpp Fix misc-macro-parentheses warnings in adb, debuggerd, libbacktrace. 2016-05-18 15:53:15 -07:00
GetPss.h Create an UnwindMapLocal object. 2014-04-03 14:19:24 -07:00
thread_utils.c Remove libbacktrace definition of gettid. 2015-05-13 13:44:34 -07:00
thread_utils.h Fix libbacktrace host build. 2015-12-07 20:09:24 -08:00
ThreadEntry.cpp Use async safe logging in signal handlers. 2017-05-04 17:15:17 -07:00
ThreadEntry.h Allow calling GetFunctionName before unwinding. 2017-03-21 14:21:49 -07:00
UnwindCurrent.cpp Cleanup the libbacktrace interface a bit. 2017-07-19 15:36:32 -07:00
UnwindCurrent.h Allow calling GetFunctionName before unwinding. 2017-03-21 14:21:49 -07:00
UnwindMap.cpp Switch libbacktrace new unwinder. 2017-10-30 13:37:50 -07:00
UnwindMap.h Allow calling GetFunctionName before unwinding. 2017-03-21 14:21:49 -07:00
UnwindPtrace.cpp Cleanup the libbacktrace interface a bit. 2017-07-19 15:36:32 -07:00
UnwindPtrace.h Allow calling GetFunctionName before unwinding. 2017-03-21 14:21:49 -07:00
UnwindStack.cpp Only skip frames for local unwinds. 2017-11-02 16:22:52 -07:00
UnwindStack.h Add a method to share the process memory object. 2017-09-05 14:30:22 -07:00
UnwindStackMap.cpp Allow multiple threads sharing a map to unwind. 2017-11-28 15:20:38 -08:00
UnwindStackMap.h libbacktrace: expose BacktraceMap's unwindstack::Memory. 2017-10-20 13:52:56 -07:00