Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Unified Diff: base/trace_event/memory_dump_manager.cc

Issue 2049143002: [memory-infra] Log reasons for memory dump failure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/trace_event/memory_dump_manager.cc
diff --git a/base/trace_event/memory_dump_manager.cc b/base/trace_event/memory_dump_manager.cc
index 4e2cc606e9b8e04396ea06f6da46a75595fb76ae..50171e5715f8399cb9b31b86230d39e8b273a345 100644
--- a/base/trace_event/memory_dump_manager.cc
+++ b/base/trace_event/memory_dump_manager.cc
@@ -337,6 +337,8 @@ void MemoryDumpManager::RequestGlobalDump(
const MemoryDumpCallback& callback) {
// Bail out immediately if tracing is not enabled at all.
if (!UNLIKELY(subtle::NoBarrier_Load(&memory_tracing_enabled_))) {
+ VLOG(1) << "Global memory dump failed because " << kTraceCategory
Primiano Tucci (use gerrit) 2016/06/08 18:00:45 I'd say s/Global memory dump/memory-infra dump/. I
petrcermak 2016/06/09 09:46:09 Done.
+ << " tracing category is not enabled";
if (!callback.is_null())
callback.Run(0u /* guid */, false /* success */);
return;
@@ -422,6 +424,11 @@ void MemoryDumpManager::SetupNextMemoryDump(
// Anyway either tracing is stopped or this was the last hop, create a trace
// event, add it to the trace and finalize process dump invoking the callback.
if (!pmd_async_state->dump_thread_task_runner.get()) {
+ VLOG(1)
+ << "Global memory dump failed because dump thread was destroyed before "
Primiano Tucci (use gerrit) 2016/06/08 18:00:45 you probably want to make "Global Memory Dump" (or
petrcermak 2016/06/09 09:46:09 Done.
+ << (pmd_async_state->pending_dump_providers.empty()
+ ? "finalizing memory dump"
+ : pmd_async_state->pending_dump_providers.back().get()->name);
pmd_async_state->dump_successful = false;
pmd_async_state->pending_dump_providers.clear();
}
@@ -596,8 +603,10 @@ void MemoryDumpManager::FinalizeDumpAndAddToTrace(
bool tracing_still_enabled;
TRACE_EVENT_CATEGORY_GROUP_ENABLED(kTraceCategory, &tracing_still_enabled);
- if (!tracing_still_enabled)
+ if (!tracing_still_enabled) {
pmd_async_state->dump_successful = false;
+ VLOG(1) << "Memory dump failed: Tracing is not enabled any more";
Primiano Tucci (use gerrit) 2016/06/08 18:00:45 I'd say here: tracing disabled before the memory d
petrcermak 2016/06/09 09:46:09 Done.
+ }
if (!pmd_async_state->callback.is_null()) {
pmd_async_state->callback.Run(dump_guid, pmd_async_state->dump_successful);

Powered by Google App Engine
This is Rietveld 408576698