Chromium Code Reviews| Index: public/platform/WebProcessMemoryDump.h |
| diff --git a/public/platform/WebProcessMemoryDump.h b/public/platform/WebProcessMemoryDump.h |
| index cdaf14358e54a1a9fcee99d45140f32212bd3071..0c6b9dd38c0424b3c4f68dd123437ec3f3f15a39 100644 |
| --- a/public/platform/WebProcessMemoryDump.h |
| +++ b/public/platform/WebProcessMemoryDump.h |
| @@ -11,6 +11,7 @@ |
| namespace blink { |
| class WebMemoryAllocatorDump; |
| +typedef uint64_t WebMemoryAllocatorDumpGuid; |
| // A container which holds all the dumps for the various allocators for a given |
| // process. Embedders of WebMemoryDumpProvider are expected to populate a |
| @@ -24,14 +25,25 @@ public: |
| // dump within the scope of a ProcessMemoryDump. It is possible to express |
| // nesting by means of a slash-separated path naming (e.g., |
| // "allocator_name/arena_1/subheap_X"). |
| + // |guid| is an optional identifier, unique among all processes within the |
| + // scope of a global dump. This is only relevant when using |
| + // AddOwnershipEdge(). If omitted, it will be automatically generated. |
| + virtual WebMemoryAllocatorDump* createMemoryAllocatorDump(const WebString& absoluteName, const WebMemoryAllocatorDumpGuid& guid) |
|
Primiano Tucci (use gerrit)
2015/06/09 20:51:34
No need of the const& on the guid anymore, this is
ssid
2015/06/10 12:36:00
Done.
|
| + { |
| + BLINK_ASSERT_NOT_REACHED(); |
| + return nullptr; |
| + } |
| + |
| virtual WebMemoryAllocatorDump* createMemoryAllocatorDump(const WebString& absoluteName) |
| { |
| + BLINK_ASSERT_NOT_REACHED(); |
| return nullptr; |
| } |
| // Gets a previously created MemoryAllocatorDump given its name. |
| virtual WebMemoryAllocatorDump* getMemoryAllocatorDump(const WebString& absoluteName) const |
| { |
| + BLINK_ASSERT_NOT_REACHED(); |
| return nullptr; |
| } |
| @@ -51,6 +63,22 @@ public: |
| { |
| BLINK_ASSERT_NOT_REACHED(); |
| } |
| + |
| + // Adds an ownership relationship between two MemoryAllocatorDump(s) with |
| + // the semantics: |source| owns |target|, and has the effect of attributing |
| + // the memory usage of |target| to |source|. |importance| is optional and |
| + // relevant only for the cases of co-ownership, where it acts as a z-index: |
| + // the owner with the highest importance will be attributed |target|'s |
| + // memory. |
| + virtual void AddOwnershipEdge(const WebMemoryAllocatorDumpGuid& source, const WebMemoryAllocatorDumpGuid& target, int importance) |
|
Primiano Tucci (use gerrit)
2015/06/09 20:51:34
ditto here and below
ssid
2015/06/10 12:36:00
Done.
|
| + { |
| + BLINK_ASSERT_NOT_REACHED(); |
| + } |
| + |
| + virtual void AddOwnershipEdge(const WebMemoryAllocatorDumpGuid& source, const WebMemoryAllocatorDumpGuid& target) |
| + { |
| + BLINK_ASSERT_NOT_REACHED(); |
| + } |
| }; |
| } // namespace blink |