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

Unified Diff: public/platform/WebProcessMemoryDump.h

Issue 1159923006: [tracing] Expose AddOwnershipEdge and CreateAllocatorDump with guid to blink. (blink-side). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 6 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 | « public/platform/WebMemoryAllocatorDump.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebProcessMemoryDump.h
diff --git a/public/platform/WebProcessMemoryDump.h b/public/platform/WebProcessMemoryDump.h
index cdaf14358e54a1a9fcee99d45140f32212bd3071..27c6e1abbcc4b6aebd74c29d48021748a3a85b1c 100644
--- a/public/platform/WebProcessMemoryDump.h
+++ b/public/platform/WebProcessMemoryDump.h
@@ -6,12 +6,11 @@
#define WebProcessMemoryDump_h
#include "WebCommon.h"
+#include "WebMemoryAllocatorDump.h"
#include "WebString.h"
namespace blink {
-class WebMemoryAllocatorDump;
-
// A container which holds all the dumps for the various allocators for a given
// process. Embedders of WebMemoryDumpProvider are expected to populate a
// WebProcessMemoryDump instance with the stats of their allocators.
@@ -24,14 +23,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, WebMemoryAllocatorDumpGuid guid)
+ {
+ 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 +61,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(WebMemoryAllocatorDumpGuid source, WebMemoryAllocatorDumpGuid target, int importance)
+ {
+ BLINK_ASSERT_NOT_REACHED();
+ }
+
+ virtual void AddOwnershipEdge(WebMemoryAllocatorDumpGuid source, WebMemoryAllocatorDumpGuid target)
+ {
+ BLINK_ASSERT_NOT_REACHED();
+ }
};
} // namespace blink
« no previous file with comments | « public/platform/WebMemoryAllocatorDump.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698