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

Unified Diff: base/trace_event/memory_dump_provider.h

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
« no previous file with comments | « base/trace_event/memory_dump_manager_unittest.cc ('k') | base/trace_event/memory_dump_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/memory_dump_provider.h
diff --git a/base/trace_event/memory_dump_provider.h b/base/trace_event/memory_dump_provider.h
index 455eecac25712086a3949347345ff0497115a862..9ec7ad92496c62c4c437968cc26659e35e935577 100644
--- a/base/trace_event/memory_dump_provider.h
+++ b/base/trace_event/memory_dump_provider.h
@@ -7,7 +7,7 @@
#include "base/base_export.h"
#include "base/memory/ref_counted.h"
-#include "base/trace_event/memory_allocator_attributes.h"
+#include "base/trace_event/memory_allocator_attributes_type_info.h"
namespace base {
@@ -26,8 +26,9 @@ class BASE_EXPORT MemoryDumpProvider {
virtual const char* GetFriendlyName() const = 0;
- const MemoryAllocatorDeclaredAttributes& allocator_attributes() const {
- return allocator_attributes_;
+ const MemoryAllocatorAttributesTypeInfo& allocator_attributes_type_info()
+ const {
+ return allocator_attributes_type_info_;
}
// The dump provider can specify an optional thread affinity (in its
@@ -48,16 +49,17 @@ class BASE_EXPORT MemoryDumpProvider {
virtual ~MemoryDumpProvider();
- void DeclareAllocatorAttribute(const MemoryAllocatorDeclaredAttribute& attr);
+ void DeclareAllocatorAttribute(const std::string& allocator_name,
+ const std::string& attribute_name,
+ const std::string& attribute_type);
private:
- // The map (attribute name -> type) that specifies the semantic of the
- // extra attributes that the MemoryAllocatorDump(s) produced by this
- // MemoryDumpProvider will have.
- MemoryAllocatorDeclaredAttributes allocator_attributes_;
+ // A map of attributes types (declared through DeclareAllocatorAttribute())
+ // emitted by this allocator dumper.
+ MemoryAllocatorAttributesTypeInfo allocator_attributes_type_info_;
// (Optional) TaskRunner on which the DumpInfo call should be posted.
- const scoped_refptr<SingleThreadTaskRunner> task_runner_;
+ scoped_refptr<SingleThreadTaskRunner> task_runner_;
DISALLOW_COPY_AND_ASSIGN(MemoryDumpProvider);
};
« no previous file with comments | « base/trace_event/memory_dump_manager_unittest.cc ('k') | base/trace_event/memory_dump_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698