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

Unified Diff: base/trace_event/memory_dump_manager.cc

Issue 1064413002: [tracing] Add browser-side test for memory dumps. Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_6_child_test
Patch Set: Debugging stmts (REMOVEME) Created 5 years, 8 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
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ed965fa2b312a8ccc40a0fcd95be2acc485fa8ed..58dfb4be9172b9f8e09edab1e013be2fb3ab1b23 100644
--- a/base/trace_event/memory_dump_manager.cc
+++ b/base/trace_event/memory_dump_manager.cc
@@ -111,6 +111,8 @@ void MemoryDumpManager::UnregisterDumpProvider(MemoryDumpProvider* mdp) {
void MemoryDumpManager::RequestGlobalDump(
MemoryDumpType dump_type,
const MemoryDumpCallback& callback) {
+ LOG(ERROR) << "MDM request enabled="
+ << subtle::NoBarrier_Load(&memory_tracing_enabled_);
// Bail out immediately if tracing is not enabled at all.
if (!UNLIKELY(subtle::NoBarrier_Load(&memory_tracing_enabled_)))
return;
@@ -127,6 +129,7 @@ void MemoryDumpManager::RequestGlobalDump(
delegate = delegate_;
}
+ LOG(ERROR) << "MDM request " << guid << " delegate : " << (void*)delegate;
if (delegate) {
// The delegate is in charge to coordinate the request among all the
// processes and call the CreateLocalDumpPoint on the local process.
@@ -144,6 +147,7 @@ void MemoryDumpManager::RequestGlobalDump(MemoryDumpType dump_type) {
// Creates a memory dump for the current process and appends it to the trace.
void MemoryDumpManager::CreateProcessDump(
const MemoryDumpRequestArgs& args) {
+ LOG(ERROR) << "MDM create " << args.dump_guid;
bool did_any_provider_dump = false;
scoped_ptr<ProcessMemoryDump> pmd(new ProcessMemoryDump());
@@ -193,6 +197,7 @@ void MemoryDumpManager::OnTraceLogEnabled() {
TRACE_EVENT_CATEGORY_GROUP_ENABLED(kTraceCategory, &enabled);
AutoLock lock(lock_);
+ LOG(ERROR) << "OnTraceLogEnabled " << enabled;
if (enabled) {
dump_providers_enabled_.assign(dump_providers_registered_.begin(),
dump_providers_registered_.end());
@@ -203,6 +208,7 @@ void MemoryDumpManager::OnTraceLogEnabled() {
}
void MemoryDumpManager::OnTraceLogDisabled() {
+ LOG(ERROR) << "OnTraceLogDisabled";
AutoLock lock(lock_);
dump_providers_enabled_.clear();
subtle::NoBarrier_Store(&memory_tracing_enabled_, 0);
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698