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

Side by Side Diff: third_party/WebKit/public/platform/WebProcessMemoryDump.h

Issue 1642023007: Refactoring: Move functions from WebMemoryDumpProviderAdapter to PartitionAllocMemoryDumpProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: primiano's review Created 4 years, 10 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
« no previous file with comments | « third_party/WebKit/public/platform/WebMemoryDumpProvider.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "WebMemoryAllocatorDump.h" 9 #include "WebMemoryAllocatorDump.h"
10 #include "WebMemoryDumpProvider.h" 10 #include "WebMemoryDumpProvider.h"
11 #include "WebString.h" 11 #include "WebString.h"
12 #include "base/trace_event/heap_profiler_allocation_context.h"
12 13
13 class SkTraceMemoryDump; 14 class SkTraceMemoryDump;
14 15
16 namespace base {
17 namespace trace_event {
18
19 class ProcessMemoryDump;
20 class TraceEventMemoryOverhead;
21
22 } // namespace trace_event
23 } // namespace base
24
15 namespace blink { 25 namespace blink {
16 26
17 // A container which holds all the dumps for the various allocators for a given 27 // A container which holds all the dumps for the various allocators for a given
18 // process. Embedders of WebMemoryDumpProvider are expected to populate a 28 // process. Embedders of WebMemoryDumpProvider are expected to populate a
19 // WebProcessMemoryDump instance with the stats of their allocators. 29 // WebProcessMemoryDump instance with the stats of their allocators.
20 class BLINK_PLATFORM_EXPORT WebProcessMemoryDump { 30 class BLINK_PLATFORM_EXPORT WebProcessMemoryDump {
21 public: 31 public:
22 virtual ~WebProcessMemoryDump(); 32 virtual ~WebProcessMemoryDump();
23 33
24 // Creates a new MemoryAllocatorDump with the given name and returns the 34 // Creates a new MemoryAllocatorDump with the given name and returns the
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // objects can be created using this method. The created dumpers are owned 106 // objects can be created using this method. The created dumpers are owned
97 // by WebProcessMemoryDump and cannot outlive the WebProcessMemoryDump 107 // by WebProcessMemoryDump and cannot outlive the WebProcessMemoryDump
98 // object owning them. |dumpNamePrefix| is prefix appended to each dump 108 // object owning them. |dumpNamePrefix| is prefix appended to each dump
99 // created by the SkTraceMemoryDump implementation, if the dump should be 109 // created by the SkTraceMemoryDump implementation, if the dump should be
100 // placed under different namespace and not "skia". 110 // placed under different namespace and not "skia".
101 virtual SkTraceMemoryDump* createDumpAdapterForSkia(const WebString& dumpNam ePrefix) 111 virtual SkTraceMemoryDump* createDumpAdapterForSkia(const WebString& dumpNam ePrefix)
102 { 112 {
103 BLINK_ASSERT_NOT_REACHED(); 113 BLINK_ASSERT_NOT_REACHED();
104 return nullptr; 114 return nullptr;
105 } 115 }
116
117 // Dumps heap memory usage. |allocatorName| is used as an absolute name for
118 // base::trace_event::ProcessMemoryDump::AddHeapDump.
119 virtual void dumpHeapUsage(const base::hash_map<base::trace_event::Allocatio nContext, size_t>& bytesByContext, base::trace_event::TraceEventMemoryOverhead& overhead, const char* allocatorName)
120 {
121 BLINK_ASSERT_NOT_REACHED();
122 }
106 }; 123 };
107 124
108 } // namespace blink 125 } // namespace blink
109 126
110 #endif // WebProcessMemoryDump_h 127 #endif // WebProcessMemoryDump_h
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/WebMemoryDumpProvider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698