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

Unified Diff: base/trace_event/memory_allocator_dump.h

Issue 2760253005: memory-infra: Fill the memory dump callback result (1/2) (Closed)
Patch Set: tweak a few comments Created 3 years, 9 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 | base/trace_event/memory_allocator_dump.cc » ('j') | base/trace_event/memory_allocator_dump.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/memory_allocator_dump.h
diff --git a/base/trace_event/memory_allocator_dump.h b/base/trace_event/memory_allocator_dump.h
index c781f071bba40ab08c25dcb18ec1f59fc1b1fc12..6a26445b9ac45cf8e6eefb20c1b7ba0908861cb8 100644
--- a/base/trace_event/memory_allocator_dump.h
+++ b/base/trace_event/memory_allocator_dump.h
@@ -63,6 +63,10 @@ class BASE_EXPORT MemoryAllocatorDump {
void AddScalarF(const char* name, const char* units, double value);
void AddString(const char* name, const char* units, const std::string& value);
+ // Get the size for this dump.
+ // The size is the value set with AddScalar(kNameSize, kUnitsBytes, size);
+ uint64_t GetSize();
Primiano Tucci (use gerrit) 2017/03/22 17:19:52 can you plz: - make this private (or protected, if
hjd 2017/03/22 19:24:20 Done.
+
// Absolute name, unique within the scope of an entire ProcessMemoryDump.
const std::string& absolute_name() const { return absolute_name_; }
@@ -90,6 +94,7 @@ class BASE_EXPORT MemoryAllocatorDump {
std::unique_ptr<TracedValue> attributes_;
MemoryAllocatorDumpGuid guid_;
int flags_; // See enum Flags.
+ uint64_t size_;
// A local buffer for Sprintf conversion on fastpath. Avoids allocating
// temporary strings on each AddScalar() call.
« no previous file with comments | « no previous file | base/trace_event/memory_allocator_dump.cc » ('j') | base/trace_event/memory_allocator_dump.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698