History log of /system/core/libbacktrace/UnwindCurrent.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c463ba45c42b4e2d8ce30c02a626d7183102f46e 09-Mar-2016 Christopher Ferris <cferris@google.com> Add error reporting mechanism for failing Unwind.

Remove the logging of an error if a thread disappears before the unwind
can begin. This can happen, so allow the caller to determine if this
is really a problem worth logging.

Bug: 27449879

(cherry picked from commit 206a3b9798e3622c906a3cafdb113c271c1c927c)

Change-Id: If9e7cfeb6eb7b122679a734c1a9eacee8354ef18
/system/core/libbacktrace/UnwindCurrent.cpp
a7a7369343a8762adfc5402425e3e922fbecaeab 02-Mar-2016 Andreas Gampe <agampe@google.com> Revert "Do not do local unwinds through .oat or .dex maps."

This reverts commit 4265ed7cc897c54c55bb18bb341859b5df0f4966.

Workaround in libunwind instead: change-id I98be5754cc4de4071616db334dc0c9862d3a2504

Bug: 27391690

(cherry picked from commit 04dcb00ab7ee73c1b6e75fe6d4e02d1f854cd4cd)

Change-Id: Id77dc081b655dc0fcb513ad0ee95221d91a301f9
/system/core/libbacktrace/UnwindCurrent.cpp
b035a19e4f29b1f711b288ea830db745cf8e1e91 02-Mar-2016 Christopher Ferris <cferris@google.com> Do not do local unwinds through .oat or .dex maps.

Bug: 27391690

(cherry picked from commit 4265ed7cc897c54c55bb18bb341859b5df0f4966)

Change-Id: I88a49537544b507a3b0bfa61eafc27400a05281b
/system/core/libbacktrace/UnwindCurrent.cpp
ca09ce902c17c2bffc02bfafaf0844204ac13333 01-Apr-2015 Christopher Ferris <cferris@google.com> Discards frames for code within library.

When doing a local unwind, do not include the frames that come
from either libunwind or libbacktrace.

Bug: 11518609
Change-Id: I0ec8d823aebbfa0903e61b16b7e5663f3fd65e78
/system/core/libbacktrace/UnwindCurrent.cpp
2c43cff01d1271be451671567955158629b23670 27-Mar-2015 Christopher Ferris <cferris@google.com> Refactor the code.

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
/system/core/libbacktrace/UnwindCurrent.cpp
12385e3ad085aa1ac06c26529b32b688503a9fcf 06-Feb-2015 Christopher Ferris <cferris@google.com> Move map data into backtrace data proper.

The backtrace structure used to include a pointer to a backtrace_map_t
that represented the map data for a particular pc. This introduced a
race condition where the pointer could be discarded, but the backtrace
structure still contained a pointer to garbage memory. Now all of the map
information is right in the structure.

Bug: 19028453
Change-Id: If7088a73f3c6bf1f3bc8cdd2bb4b62e7cab831c0
/system/core/libbacktrace/UnwindCurrent.cpp
c58287d60166ebdb1bd39fa40e5524c868c73a9b 10-May-2014 Christopher Ferris <cferris@google.com> Only include ucontext.h when necessary.

Change-Id: I29014f6c6b82e0a9797e5d76147b3c4e3d82a7f5
/system/core/libbacktrace/UnwindCurrent.cpp
a2efd3ac7abe223aa7a8ba8b5ba448216c4953b4 07-May-2014 Christopher Ferris <cferris@google.com> Rewrite unwind thread handling.

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
/system/core/libbacktrace/UnwindCurrent.cpp
17224d57fbc690051fbfecdc95140ead21305ba3 11-Apr-2014 Christopher Ferris <cferris@google.com> Avoid logging functions from signal handler.

(cherry picked from commit 9007677fcbcd7cf01725e155920a8abfcb323c56)

Change-Id: Ic0163f43308c6a281ab3757d90933e5127843fed
/system/core/libbacktrace/UnwindCurrent.cpp
e29609106033a48a6128664668d22bf4fb42a7ee 08-Mar-2014 Christopher Ferris <cferris@google.com> Create an UnwindMapLocal object.

The way libunwind handles local unwinds is different from remote unwinds,
so create a new map object to handle the differences.

Add new test to verify the map data is being generated correctly.

Add new tests to check for leaks.

Refactor the BACK_LOGW code into a single header file.

Change-Id: I01f3cbfc4b927646174ea1b614fa25d23b9b3427
/system/core/libbacktrace/UnwindCurrent.cpp
c6c194ced095df5e777b8fa24527ebd29c8fef54 21-Nov-2013 Pavel Chupin <pavel.v.chupin@intel.com> LP64: Enable debuggerd/libbacktrace/libunwind.

Change-Id: I2e432839f86c33c2adbaac8cc12ca8961956044b
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
/system/core/libbacktrace/UnwindCurrent.cpp
5c40019a92a1683fd790a80f53f8ca6c24289e46 30-Jan-2014 Christopher Ferris <cferris@google.com> Clean up UnwindCurrent.cpp's use of ucontext.h.

Change-Id: I9eff7486b9fe89eac57b5555649b871bc6f1cc77
/system/core/libbacktrace/UnwindCurrent.cpp
df2906186b6952c57b1f662bfef0b65c9f8c2e0d 23-Jan-2014 Christopher Ferris <cferris@google.com> Re-enable libunwind for arm.

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
/system/core/libbacktrace/UnwindCurrent.cpp
edbe3b4b56a02e1c56f95a8ab05afb4135339cc8 27-Jan-2014 Christopher Ferris <cferris@google.com> Get arm64 to compile.

Change-Id: Ica021aa134388fe7069a5de5df8036ecf0d570f8
/system/core/libbacktrace/UnwindCurrent.cpp
46756821c4fe238f12a6e5ea18c356398f8d8795 15-Jan-2014 Christopher Ferris <cferris@google.com> Rewrite libbacktrace to be all C++.

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
/system/core/libbacktrace/UnwindCurrent.cpp
20303f856f1f1cdb5af58af0b116b8c598f0ea5c 11-Jan-2014 Christopher Ferris <cferris@google.com> Next phase of the move, reformat use C++ features.

Use the libbacktrace C++ interface instead of the C interface in debuggerd.

Reformat the debuggerd code to be closer to Google C++ style.

Fix all debuggerd casts to be C++ casts.

Add a frame number to the frame data structure for ease of formatting and
add another FormatFrameData function.

Change the format_test to use the new FormatFrameData function.

Modify all of the backtrace_test to use the C++ interface.

Change-Id: I10e1610861acf7f4a3ad53276b74971cfbfda464
/system/core/libbacktrace/UnwindCurrent.cpp
9846497f7926fc3240c2893d89e60880c22d1fd6 07-Jan-2014 Christopher Ferris <cferris@google.com> Refactor to share map_info amongst threads.

Allow the use of the same map info to be shared when getting information on
multiple threads from the same pid.

Change-Id: I2e460e20154a10f4894ae563331fb32179e4551f
/system/core/libbacktrace/UnwindCurrent.cpp
ddc4f093f7e2f6c6dd7d4b4fa356c1dcb753dbbe 07-Jan-2014 Christopher Ferris <cferris@google.com> Fix the ucontext for mips/x86.

Remove the mips ucontext definition, there is no need for it any more.

Fix the mips/x86 ucontext copy code to copy the entire uc_mcontext data
across.

Fix a potential memory leak too.

Change-Id: I4272022da5281ed881e2d59a3e19e7f33c01aceb
/system/core/libbacktrace/UnwindCurrent.cpp
8ed46278bee3cfc4c216f3a1524744019b693200 29-Oct-2013 Christopher Ferris <cferris@google.com> More libbacktrace fixes.

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
/system/core/libbacktrace/UnwindCurrent.cpp
17e91d44edf5e6476a477a200bcd89d4327358a3 21-Oct-2013 Christopher Ferris <cferris@google.com> Rewrite libbacktrace using C++.

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
/system/core/libbacktrace/UnwindCurrent.cpp