Chromium Code Reviews| Index: base/trace_event/malloc_dump_provider.h |
| diff --git a/base/trace_event/malloc_dump_provider.h b/base/trace_event/malloc_dump_provider.h |
| index 384033c9b82abc55125405e9a29ede7aa9597c08..e8b9e5f99199b9abbbb2a4b70ab7553b240896bb 100644 |
| --- a/base/trace_event/malloc_dump_provider.h |
| +++ b/base/trace_event/malloc_dump_provider.h |
| @@ -25,6 +25,21 @@ namespace trace_event { |
| class AllocationRegister; |
| +struct MallocStatistics { |
| + size_t allocated_objects_size; |
| + size_t allocated_objects_count; |
| + size_t metadata_fragmentation_caches; |
| + size_t total_virtual_size; |
| + size_t resident_size; |
| + |
| + MallocStatistics() |
| + : allocated_objects_size(0), |
| + allocated_objects_count(0), |
| + metadata_fragmentation_caches(0), |
| + total_virtual_size(0), |
| + resident_size(0) {} |
| +}; |
| + |
| // Dump provider which collects process-wide memory stats. |
| class BASE_EXPORT MallocDumpProvider : public MemoryDumpProvider { |
| public: |
| @@ -34,6 +49,8 @@ class BASE_EXPORT MallocDumpProvider : public MemoryDumpProvider { |
| static MallocDumpProvider* GetInstance(); |
| + static MallocStatistics GetStatistics(); |
|
bashi
2016/09/22 23:28:26
I'd propose to have a separate base/memory/malloc_
|
| + |
| // MemoryDumpProvider implementation. |
| bool OnMemoryDump(const MemoryDumpArgs& args, |
| ProcessMemoryDump* pmd) override; |