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

Unified Diff: base/trace_event/memory_allocator_dump.cc

Issue 1583483002: [tracing] Add method to create "weak" global dumps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes. Created 4 years, 11 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 | « base/trace_event/memory_allocator_dump.h ('k') | base/trace_event/process_memory_dump.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/memory_allocator_dump.cc
diff --git a/base/trace_event/memory_allocator_dump.cc b/base/trace_event/memory_allocator_dump.cc
index 5c5af7ee45842e716b92c5fcf7018641a3bfb023..f9b5799c05eb04b388e37dd6d7858d554990a65a 100644
--- a/base/trace_event/memory_allocator_dump.cc
+++ b/base/trace_event/memory_allocator_dump.cc
@@ -28,7 +28,8 @@ MemoryAllocatorDump::MemoryAllocatorDump(const std::string& absolute_name,
: absolute_name_(absolute_name),
process_memory_dump_(process_memory_dump),
attributes_(new TracedValue),
- guid_(guid) {
+ guid_(guid),
+ flags_(Flags::DEFAULT) {
// The |absolute_name| cannot be empty.
DCHECK(!absolute_name.empty());
@@ -90,6 +91,8 @@ void MemoryAllocatorDump::AsValueInto(TracedValue* value) const {
value->BeginDictionaryWithCopiedName(absolute_name_);
value->SetString("guid", guid_.ToString());
value->SetValue("attrs", *attributes_);
+ if (flags_)
+ value->SetInteger("flags", flags_);
value->EndDictionary(); // "allocator_name/heap_subheap": { ... }
}
« no previous file with comments | « base/trace_event/memory_allocator_dump.h ('k') | base/trace_event/process_memory_dump.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698