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

Side by Side 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: A blank line. 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 unified diff | Download patch
OLDNEW
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 WebProcessMemoryDump_h 5 #ifndef WebProcessMemoryDump_h
6 #define WebProcessMemoryDump_h 6 #define WebProcessMemoryDump_h
7 7
8 #include "WebCommon.h" 8 #include "WebCommon.h"
9 #include "WebString.h" 9 #include "WebString.h"
10 #include "public/platform/WebMemoryAllocatorDump.h"
10 11
11 namespace blink { 12 namespace blink {
12 13
13 class WebMemoryAllocatorDump;
14
15 // A container which holds all the dumps for the various allocators for a given 14 // A container which holds all the dumps for the various allocators for a given
16 // process. Embedders of WebMemoryDumpProvider are expected to populate a 15 // process. Embedders of WebMemoryDumpProvider are expected to populate a
17 // WebProcessMemoryDump instance with the stats of their allocators. 16 // WebProcessMemoryDump instance with the stats of their allocators.
18 class BLINK_PLATFORM_EXPORT WebProcessMemoryDump { 17 class BLINK_PLATFORM_EXPORT WebProcessMemoryDump {
19 public: 18 public:
20 virtual ~WebProcessMemoryDump(); 19 virtual ~WebProcessMemoryDump();
21 20
22 // Creates a new MemoryAllocatorDump with the given name and returns the 21 // Creates a new MemoryAllocatorDump with the given name and returns the
23 // empty object back to the caller. |absoluteName| uniquely identifies the 22 // empty object back to the caller. |absoluteName| uniquely identifies the
24 // dump within the scope of a ProcessMemoryDump. It is possible to express 23 // dump within the scope of a ProcessMemoryDump. It is possible to express
(...skipping 11 matching lines...) Expand all
36 { 35 {
37 } 36 }
38 37
39 // Merges all WebMemoryAllocatorDump(s) contained in |other| inside this 38 // Merges all WebMemoryAllocatorDump(s) contained in |other| inside this
40 // WebProcessMemoryDump, transferring their ownership to this instance. 39 // WebProcessMemoryDump, transferring their ownership to this instance.
41 // |other| will be an empty WebProcessMemoryDump after this method returns 40 // |other| will be an empty WebProcessMemoryDump after this method returns
42 // and can be reused as if it was new. 41 // and can be reused as if it was new.
43 virtual void takeAllDumpsFrom(WebProcessMemoryDump* other) 42 virtual void takeAllDumpsFrom(WebProcessMemoryDump* other)
44 { 43 {
45 } 44 }
45
46 // Adds an ownership relationship between two MemoryAllocatorDump(s) with
47 // the semantics: |source| owns |target|, and has the effect of attributing
48 // the memory usage of |target| to |source|. |importance| is optional and
49 // relevant only for the cases of co-ownership, where it acts as a z-index:
50 // the owner with the highest importance will be attributed |target|'s
51 // memory.
52 virtual void AddOwnershipEdge(WebMemoryAllocatorDumpGuid source, WebMemoryAl locatorDumpGuid target, int importance)
Primiano Tucci (use gerrit) 2015/05/29 11:24:53 const WMADG& source (and target)
ssid 2015/05/29 15:50:48 Done.
53 {
54 }
55
56 virtual void AddOwnershipEdge(WebMemoryAllocatorDumpGuid source, WebMemoryAl locatorDumpGuid target)
57 {
58 }
46 }; 59 };
47 60
48 } // namespace blink 61 } // namespace blink
49 62
50 #endif // WebProcessMemoryDump_h 63 #endif // WebProcessMemoryDump_h
OLDNEW
« 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