From c328e4465d12d760f5fbcb2daddf5fa4138f50b1 Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Mon, 1 Apr 2019 19:31:26 -0700 Subject: Disable info messages by default for malloc debug. Add a new option verbose for malloc debug that is not enabled by default. This disables all of the info log messages. It turns out these log messages can add a measurable amount of time and can change the boot up. Bug: 129239269 Test: Adjusted unit tests pass. Test: Verified no messages unless verbose option used. Change-Id: I805cb7c8ecb44de88119574e59d784877cacc383 --- libc/malloc_debug/malloc_debug.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libc/malloc_debug/malloc_debug.cpp') diff --git a/libc/malloc_debug/malloc_debug.cpp b/libc/malloc_debug/malloc_debug.cpp index 093bdee8c..114579626 100644 --- a/libc/malloc_debug/malloc_debug.cpp +++ b/libc/malloc_debug/malloc_debug.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -252,6 +253,10 @@ bool debug_initialize(const MallocDispatch* malloc_dispatch, int* malloc_zygote_ // of different error cases. backtrace_startup(); + if (g_debug->config().options() & VERBOSE) { + info_log("%s: malloc debug enabled", getprogname()); + } + return true; } -- cgit v1.2.3