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

Unified Diff: content/child/web_process_memory_dump_impl.h

Issue 1308523004: Implement GetSkiaTraceMemoryDump and AddSuballocation on chrome blink platform impl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web_cache_move
Patch Set: rebase. Created 5 years, 3 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 | « content/child/web_memory_dump_provider_adapter.cc ('k') | content/child/web_process_memory_dump_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/web_process_memory_dump_impl.h
diff --git a/content/child/web_process_memory_dump_impl.h b/content/child/web_process_memory_dump_impl.h
index 2042d25866c438fced29f2ef1242445cbc5d6605..693de3af5131325ea2cadd6ecc0193a07187c286 100644
--- a/content/child/web_process_memory_dump_impl.h
+++ b/content/child/web_process_memory_dump_impl.h
@@ -8,6 +8,8 @@
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
+#include "base/trace_event/memory_dump_request_args.h"
#include "content/common/content_export.h"
#include "third_party/WebKit/public/platform/WebProcessMemoryDump.h"
@@ -18,6 +20,10 @@ class ProcessMemoryDump;
} // namespace base
} // namespace trace_event
+namespace skia {
+class SkTraceMemoryDump_Chrome;
+} // namespace skia
+
namespace content {
class WebMemoryAllocatorDumpImpl;
@@ -34,6 +40,7 @@ class CONTENT_EXPORT WebProcessMemoryDumpImpl final
// Wraps (without owning) an existing ProcessMemoryDump.
explicit WebProcessMemoryDumpImpl(
+ base::trace_event::MemoryDumpLevelOfDetail level_of_detail,
base::trace_event::ProcessMemoryDump* process_memory_dump);
~WebProcessMemoryDumpImpl() override;
@@ -53,6 +60,11 @@ class CONTENT_EXPORT WebProcessMemoryDumpImpl final
int importance) override;
void AddOwnershipEdge(blink::WebMemoryAllocatorDumpGuid source,
blink::WebMemoryAllocatorDumpGuid target) override;
+ virtual void AddSuballocation(
+ blink::WebMemoryAllocatorDumpGuid source,
+ const blink::WebString& targetNodeName) override;
+ virtual SkTraceMemoryDump* CreateDumpAdapterForSkia(
+ const blink::WebString& dumpNamePrefix) override;
const base::trace_event::ProcessMemoryDump* process_memory_dump() const {
return process_memory_dump_;
@@ -71,6 +83,9 @@ class CONTENT_EXPORT WebProcessMemoryDumpImpl final
// createMemoryAllocatorDump() calls will be proxied to.
base::trace_event::ProcessMemoryDump* process_memory_dump_; // Not owned.
+ // TODO(ssid): Remove it once this information is added to ProcessMemoryDump.
+ base::trace_event::MemoryDumpLevelOfDetail level_of_detail_;
+
// Reverse index of MemoryAllocatorDump -> WebMemoryAllocatorDumpImpl wrapper.
// By design WebMemoryDumpProvider(s) are not supposed to hold the pointer
// to the WebProcessMemoryDump passed as argument of the onMemoryDump() call.
@@ -80,6 +95,9 @@ class CONTENT_EXPORT WebProcessMemoryDumpImpl final
scoped_ptr<WebMemoryAllocatorDumpImpl>>
memory_allocator_dumps_;
+ // Stores SkTraceMemoryDump for the current ProcessMemoryDump.
+ ScopedVector<skia::SkTraceMemoryDump_Chrome> sk_trace_dump_list_;
+
DISALLOW_COPY_AND_ASSIGN(WebProcessMemoryDumpImpl);
};
« no previous file with comments | « content/child/web_memory_dump_provider_adapter.cc ('k') | content/child/web_process_memory_dump_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698