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

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: non const struct for assignment. Created 5 years, 7 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
Index: public/platform/WebProcessMemoryDump.h
diff --git a/public/platform/WebProcessMemoryDump.h b/public/platform/WebProcessMemoryDump.h
index bbc5b83e7e6b6cdfa8cc9a38b4bfc8a3d4dd312c..985424a05a5594e3e1de14508ca4819a2cd1fb9a 100644
--- a/public/platform/WebProcessMemoryDump.h
+++ b/public/platform/WebProcessMemoryDump.h
@@ -7,11 +7,10 @@
#include "WebCommon.h"
#include "WebString.h"
+#include "public/platform/WebMemoryAllocatorDump.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,11 +23,19 @@ 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)
Primiano Tucci (use gerrit) 2015/06/02 12:38:52 Well at this point you should swap the order of th
ssid 2015/06/02 16:08:02 Done.
{
return nullptr;
}
+ virtual WebMemoryAllocatorDump* createMemoryAllocatorDump(const WebString& absoluteName, const WebMemoryAllocatorDumpGuid& guid)
+ {
+ return nullptr;
+ }
+
// Removes all the WebMemoryAllocatorDump(s) contained in this instance.
// This WebProcessMemoryDump can be safely reused as if it was new once this
// method returns.
@@ -43,6 +50,20 @@ public:
virtual void takeAllDumpsFrom(WebProcessMemoryDump* other)
{
}
+
+ // 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/02 12:38:52 nit, missing & (const WMADG& source). Same below
ssid 2015/06/02 16:08:02 Done.
+ {
+ }
+
+ virtual void AddOwnershipEdge(const WebMemoryAllocatorDumpGuid source, const WebMemoryAllocatorDumpGuid target)
+ {
+ }
};
} // namespace blink
« public/platform/WebMemoryAllocatorDump.h ('K') | « public/platform/WebMemoryAllocatorDump.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698