summaryrefslogtreecommitdiffstats
path: root/libbacktrace/BacktraceThread.h
Commit message (Collapse)AuthorAgeFilesLines
* Refactor the code.Christopher Ferris2015-03-311-92/+0
| | | | | | | | The object hierarchy was confusing and convoluted. This removes a lot of unnecessary code, and consolidates the BacktraceCurrent and BacktraceThread code into BacktraceCurrent. Change-Id: I01c8407d493712a48169df49dd3ff46db4a7c3ae
* Convert futex to cond wait.Christopher Ferris2014-11-141-3/+7
| | | | | | | | | | | | | Switch to the better supported pthread_cond to handle the Wait/Wake functions. Also, increase the number of simultaneous threads in the thread tests. Bug: 18381207 (cherry picked from commit db44538387b08f367fc2419653639866f4c2fbd6) Change-Id: Id326a7a7b92cb61573def3f761597c40f3ef2f4b
* Only copy mcontext data from sigcontext.Christopher Ferris2014-05-231-4/+2
| | | | | | | | | | The ucontext_t data structure could be bigger than the kernel data structure. Since the unwinder only cares about the mcontext data, only copy that out of the structure. The mcontext data is the same size in the kernel and in the ucontext_t structure. Bug: 15189014 Change-Id: I5978169c4425b8212e11db85a57eb319cd0e264b
* Rewrite unwind thread handling.Christopher Ferris2014-05-081-51/+42
| | | | | | | | | | | | | | | | | | This new version doesn't require any specialized thread implementation, it uses the Current implementation to do its job. In addition, it runs much faster when multiple threads are trying to unwind at the same time since the global signal lock is held for only a small amount of time. Even running through the threads one at a time should be faster since it no longer requires two passes through the unwound stacks. The new code now allows multiple simultaneous unwinds of the same thread. Finally, add the ability to unwind from a ucontext_t passed in. This functionality doesn't work for remote unwinds yet. Change-Id: I4d181d7ca5ffd2acfd1686e668e6d21e36b425cb
* Use real time signal for threads instead of SIGURG.Christopher Ferris2014-04-301-0/+9
| | | | | | | This guarantees that any application is not also using this signal for some other purpose. Change-Id: I7c9bbb0ec8bb4e13322ecda951bcd43c6bf6ee1a
* Re-enable libunwind for arm.Christopher Ferris2014-01-281-3/+1
| | | | | | | | | | Update to handle the new optimized way that libunwind works. In addition, a small refactor of the BacktraceMap code. A few new tests of for good measure. Change-Id: I2f9b4f5ad5a0dfe907b31febee76e4b9b94fb76f
* Rewrite libbacktrace to be all C++.Christopher Ferris2014-01-161-3/+3
| | | | | | | | | | | | | This includes removing the map_info.c source and replacing it with the BacktraceMap class to handle all map related code. Change all callers of libbacktrace map functionality. Also modify the corkscrew thread code so that it doesn't need to build the map twice (once in the corkscrew format and once in the libbacktrace format). Change-Id: I32865a39f83a3dd6f958fc03c2759ba47d12382e
* Create a bare bones host libbacktrace on mac.Christopher Ferris2014-01-131-1/+0
| | | | | | | This allows the libbacktrace library to compile for host on mac. Bug: 12474939 Change-Id: I32cbcf996e6fe9057e5065ba21f89086343704a0
* Refactor to share map_info amongst threads.Christopher Ferris2014-01-081-1/+2
| | | | | | | Allow the use of the same map info to be shared when getting information on multiple threads from the same pid. Change-Id: I2e460e20154a10f4894ae563331fb32179e4551f
* More libbacktrace fixes.Christopher Ferris2013-10-301-10/+9
| | | | | | | | | | | | Included in minor fix ups is the addition of a warning macro to replace all of the ALOGW calls. Fix a race where multiple threads could be attempting to unwind the threads of the current process at the same time. Bug: 8410085 Change-Id: I02a65dc778dde690e5f95fc8ff069a32d0832fd1
* Rewrite libbacktrace using C++.Christopher Ferris2013-10-281-0/+93
The old code was essentially trying to be C++ in C and was awkward. This change makes it all objects with a thin layer that C code can use. There is a C++ backtrace object that is not very useful, this code will replace it. This change also includes moving the backtrace test to a gtest, and adding coverage of all major functionality. Bug: 8410085 Change-Id: Iae0f1b09b3dd60395f71ed66010c1ea5cdd37841