diff options
author | Christopher Ferris <cferris@google.com> | 2019-04-01 19:31:26 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2019-04-02 10:55:21 -0700 |
commit | c328e4465d12d760f5fbcb2daddf5fa4138f50b1 (patch) | |
tree | fd91c386332bbe1198cb0bedc11505b76d146057 /libc/malloc_debug/tests/malloc_debug_system_tests.cpp | |
parent | 4699cf61746d37fc11c8eb8bdfc7eb296a476e4b (diff) |
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
Diffstat (limited to 'libc/malloc_debug/tests/malloc_debug_system_tests.cpp')
-rw-r--r-- | libc/malloc_debug/tests/malloc_debug_system_tests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/malloc_debug/tests/malloc_debug_system_tests.cpp b/libc/malloc_debug/tests/malloc_debug_system_tests.cpp index 4fcd04c81..71e8ebf73 100644 --- a/libc/malloc_debug/tests/malloc_debug_system_tests.cpp +++ b/libc/malloc_debug/tests/malloc_debug_system_tests.cpp @@ -195,7 +195,7 @@ TEST(MallocTests, DISABLED_smoke) {} TEST(MallocDebugSystemTest, smoke) { pid_t pid; - ASSERT_NO_FATAL_FAILURE(Exec("MallocTests.DISABLED_smoke", "backtrace", &pid)); + ASSERT_NO_FATAL_FAILURE(Exec("MallocTests.DISABLED_smoke", "verbose backtrace", &pid)); ASSERT_NO_FATAL_FAILURE(FindStrings(pid, std::vector<const char*>{"malloc debug enabled"})); } @@ -399,7 +399,7 @@ static void VerifyLeak(const char* test_prefix) { pid_t pid; SCOPED_TRACE(testing::Message() << functions[i].name << " expected size " << functions[i].size); std::string test = std::string("MallocTests.DISABLED_") + test_prefix + functions[i].name; - EXPECT_NO_FATAL_FAILURE(Exec(test.c_str(), "backtrace leak_track", &pid)); + EXPECT_NO_FATAL_FAILURE(Exec(test.c_str(), "verbose backtrace leak_track", &pid)); std::string expected_leak = android::base::StringPrintf("leaked block of size %zu at", functions[i].size); EXPECT_NO_FATAL_FAILURE(FindStrings( |