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

Unified Diff: base/trace_event/memory_dump_manager.cc

Issue 1095003002: [tracing] Simplify design of MemoryAllocatorDump (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@matr_2_sess
Patch Set: Rebase 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
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 c593b804a455976cd7bffd8f340a5058cc91bf68..31fe92e2f3163e2faa9c0457176006af2157bee6 100644
--- a/base/trace_event/memory_dump_manager.cc
+++ b/base/trace_event/memory_dump_manager.cc
@@ -311,7 +311,13 @@ void MemoryDumpManager::OnTraceLogEnabled() {
AutoLock lock(lock_);
dump_providers_enabled_.clear();
if (enabled) {
+ // Merge the dictionary of allocator attributes from all dump providers
+ // into the session state.
session_state_ = new MemoryDumpSessionState();
+ for (const MemoryDumpProvider* mdp : dump_providers_registered_) {
+ session_state_->allocators_attributes_type_info.Update(
+ mdp->allocator_attributes_type_info());
+ }
dump_providers_enabled_ = dump_providers_registered_;
}
subtle::NoBarrier_Store(&memory_tracing_enabled_, 1);
« no previous file with comments | « base/trace_event/memory_allocator_dump_unittest.cc ('k') | base/trace_event/memory_dump_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698