summaryrefslogtreecommitdiffstats
path: root/libc/bionic/debug_mapinfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add support for non-zero vaddr in maps.Christopher Ferris2015-07-211-3/+67
| | | | | | | | | | | If a map has a non-zero vaddr then it needs to be added to the computed relative offset. Bug: 22532054 (cherry picked from commit 70b6e1daffd58ebce006d4b504cd0fb9672b6d07) Change-Id: I1e98741d6ff3b5bbb7fc5f88cc85b27ace75ee2e
* libc should use O_CLOEXEC when opening files for its own use.Elliott Hughes2014-08-261-1/+1
| | | | Change-Id: I159f1d57e0ca090d837f57854fcef5879b8b8248
* Use libunwindbacktrace for debug malloc code.Christopher Ferris2014-07-291-21/+32
| | | | | | | | | | | | | | | | | | Create a method of disabling the debug allocation code paths so that it's possible to use the libunwindbacktrace library without any modifications. Use this path to create and destroy the maps for the process. It's not stricly necessary in the init code since the symbols are not modified until after the initialize calls. Also, remove the debug_XXX source files that doesn't need to be in libc.so. Fix the maps reading code since it was completely broken for 64 bit. Bug: 16408686 Change-Id: I6b02ef6ce26fdb7a59ad1029e7cbba9accceb704
* Use the mmap/munmap for allocation routines.Christopher Ferris2014-07-181-10/+5
| | | | | | | | To avoid any issues calling malloc related routines, use mmap/munmap. Specifically, this avoids any problems when this is compiled into a malloc debug shared library. Change-Id: Iae2d197145da43dc103ad6024357d8cc2374378f
* Support for jemalloc to replace dlmalloc.Christopher Ferris2014-05-201-2/+8
| | | | | | | | | | | | To use jemalloc, add MALLOC_IMPL = jemalloc in a board config file and you get the new version automatically. Update the pthread_create_key tests since jemalloc uses a few keys. Add a new test to verify memalign works as expected. Bug: 981363 Change-Id: I16eb152b291a95bd2499e90492fc6b4bd7053836
* Don't collect useless stack frames; do demangle C++ symbols.Elliott Hughes2013-01-291-5/+5
| | | | | | | | | | | | | | Previously, we'd collect every stack frame and then throw some away when we came to log them. This meant that stack traces were effectively shorter than the buffers that had been allocated for them. This patch only stores frames we'll actually output. Also dynamically call the C++ demangler so we don't have to try to read mangled names. Because no one knows the mangling of operator new[] for int arrays off the top of their head. Bug: 7291287 Change-Id: I42b022fd7cd61675d05171de4c3b2704d058ef2a
* Fix the duplication in the debugging code.Elliott Hughes2013-01-181-0/+96
We had two copies of the backtrace code, and two copies of the libcorkscrew /proc/pid/maps code. This patch gets us down to one. We also had hacks so we could log in the malloc debugging code. This patch pulls the non-allocating "printf" code out of the dynamic linker so everyone can share. This patch also makes the leak diagnostics easier to read, and makes it possible to paste them directly into the 'stack' tool (by using relative PCs). This patch also fixes the stdio standard stream leak that was causing a leak warning every time tf_daemon ran. Bug: 7291287 Change-Id: I66e4083ac2c5606c8d2737cb45c8ac8a32c7cfe8