| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_H_ | 5 #ifndef BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_H_ |
| 6 #define BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_H_ | 6 #define BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_H_ |
| 7 | 7 |
| 8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/trace_event/memory_allocator_attributes_type_info.h" | |
| 12 #include "base/values.h" | 11 #include "base/values.h" |
| 13 | 12 |
| 14 namespace base { | 13 namespace base { |
| 15 namespace trace_event { | 14 namespace trace_event { |
| 16 | 15 |
| 17 class MemoryDumpManager; | 16 class MemoryDumpManager; |
| 18 class ProcessMemoryDump; | 17 class ProcessMemoryDump; |
| 19 class TracedValue; | 18 class TracedValue; |
| 20 | 19 |
| 21 // Data model for user-land memory allocator dumps. | 20 // Data model for user-land memory allocator dumps. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 int GetIntegerAttribute(const std::string& name) const; | 74 int GetIntegerAttribute(const std::string& name) const; |
| 76 | 75 |
| 77 // Called at trace generation time to populate the TracedValue. | 76 // Called at trace generation time to populate the TracedValue. |
| 78 void AsValueInto(TracedValue* value) const; | 77 void AsValueInto(TracedValue* value) const; |
| 79 | 78 |
| 80 // Get the ProcessMemoryDump instance that owns this. | 79 // Get the ProcessMemoryDump instance that owns this. |
| 81 ProcessMemoryDump* process_memory_dump() const { | 80 ProcessMemoryDump* process_memory_dump() const { |
| 82 return process_memory_dump_; | 81 return process_memory_dump_; |
| 83 } | 82 } |
| 84 | 83 |
| 85 // Retrieves the map of allocator attributes types, which is shared by all | |
| 86 // MemoryAllocatorDump(s) across all ProcessMemoryDump(s) per tracing session. | |
| 87 const MemoryAllocatorAttributesTypeInfo& GetAttributesTypeInfo() const; | |
| 88 | |
| 89 private: | 84 private: |
| 90 const std::string allocator_name_; | 85 const std::string allocator_name_; |
| 91 const std::string heap_name_; | 86 const std::string heap_name_; |
| 92 ProcessMemoryDump* const process_memory_dump_; // Not owned (PMD owns this). | 87 ProcessMemoryDump* const process_memory_dump_; // Not owned (PMD owns this). |
| 93 uint64 physical_size_in_bytes_; | 88 uint64 physical_size_in_bytes_; |
| 94 uint64 allocated_objects_count_; | 89 uint64 allocated_objects_count_; |
| 95 uint64 allocated_objects_size_in_bytes_; | 90 uint64 allocated_objects_size_in_bytes_; |
| 96 DictionaryValue attributes_values_; | 91 DictionaryValue attributes_values_; |
| 97 | 92 |
| 98 DISALLOW_COPY_AND_ASSIGN(MemoryAllocatorDump); | 93 DISALLOW_COPY_AND_ASSIGN(MemoryAllocatorDump); |
| 99 }; | 94 }; |
| 100 | 95 |
| 101 } // namespace trace_event | 96 } // namespace trace_event |
| 102 } // namespace base | 97 } // namespace base |
| 103 | 98 |
| 104 #endif // BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_H_ | 99 #endif // BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_H_ |
| OLD | NEW |