summaryrefslogtreecommitdiff
path: root/libc/malloc_debug/Config.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2018-04-05 11:12:38 -0700
committerChristopher Ferris <cferris@google.com>2018-05-24 08:44:53 -0700
commit93bdd6ae3ad8322b7be2be0201c8db7227631d14 (patch)
tree42ee959b96c2c2db42f0569554680dbe22ce39ef /libc/malloc_debug/Config.cpp
parent4c5c45346fcc6f066a89bfc455f287fe2f4e3e41 (diff)
Add support for using the new unwinder.
This adds a new option backtrace_full, when it is set, then it will use libunwindstack. Modify the dump to file data to dump the extra information from libunwindstack. Along with the new dump file format, change the version to v1.1. Updated document for new format of file data. Add unit tests for the new functionality. Bug: 74361929 Test: Ran unit tests. Change-Id: I40fff795f5346bba7b9d7fde2e04f269ff4eb7f1
Diffstat (limited to 'libc/malloc_debug/Config.cpp')
-rw-r--r--libc/malloc_debug/Config.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/malloc_debug/Config.cpp b/libc/malloc_debug/Config.cpp
index 2c94fe81f..96fc27f73 100644
--- a/libc/malloc_debug/Config.cpp
+++ b/libc/malloc_debug/Config.cpp
@@ -93,6 +93,9 @@ const std::unordered_map<std::string, Config::OptionInfo> Config::kOptions = {
{
"backtrace_dump_prefix", {0, &Config::SetBacktraceDumpPrefix},
},
+ {
+ "backtrace_full", {BACKTRACE_FULL, &Config::VerifyValueEmpty},
+ },
{
"fill", {FILL_ON_ALLOC | FILL_ON_FREE, &Config::SetFill},
@@ -363,6 +366,11 @@ void Config::LogUsage() const {
error_log(" backtrace_dump_prefix.<PID>.final.txt.");
error_log(" The default is false.");
error_log("");
+ error_log(" backtrace_full");
+ error_log(" Any time a backtrace is acquired, use an unwinder that can");
+ error_log(" display Java stack frames. This unwinder can run slower than");
+ error_log(" normal unwinder.");
+ error_log("");
error_log(" fill_on_alloc[=XX]");
error_log(" On first allocation, fill with the value 0x%02x.", DEFAULT_FILL_ALLOC_VALUE);
error_log(" If XX is set it will only fill up to XX bytes of the");