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

Unified Diff: content/child/web_process_memory_dump_impl.cc

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_process_memory_dump_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/web_process_memory_dump_impl.cc
diff --git a/content/child/web_process_memory_dump_impl.cc b/content/child/web_process_memory_dump_impl.cc
index 688b6c1616690ad85a52505759f6414de37044af..ec7c47bea63159a842b251d213dd5d1414ad8c24 100644
--- a/content/child/web_process_memory_dump_impl.cc
+++ b/content/child/web_process_memory_dump_impl.cc
@@ -6,19 +6,21 @@
#include "base/trace_event/process_memory_dump.h"
#include "content/child/web_memory_allocator_dump_impl.h"
+#include "skia/ext/SkTraceMemoryDump_chrome.h"
namespace content {
WebProcessMemoryDumpImpl::WebProcessMemoryDumpImpl()
: owned_process_memory_dump_(
new base::trace_event::ProcessMemoryDump(nullptr)),
- process_memory_dump_(owned_process_memory_dump_.get()) {
-}
+ process_memory_dump_(owned_process_memory_dump_.get()),
+ level_of_detail_(base::trace_event::MemoryDumpLevelOfDetail::DETAILED) {}
WebProcessMemoryDumpImpl::WebProcessMemoryDumpImpl(
+ base::trace_event::MemoryDumpLevelOfDetail level_of_detail,
base::trace_event::ProcessMemoryDump* process_memory_dump)
- : process_memory_dump_(process_memory_dump) {
-}
+ : process_memory_dump_(process_memory_dump),
+ level_of_detail_(level_of_detail) {}
WebProcessMemoryDumpImpl::~WebProcessMemoryDumpImpl() {
}
@@ -132,4 +134,19 @@ void WebProcessMemoryDumpImpl::AddOwnershipEdge(
base::trace_event::MemoryAllocatorDumpGuid(target));
}
+void WebProcessMemoryDumpImpl::AddSuballocation(
+ blink::WebMemoryAllocatorDumpGuid source,
+ const blink::WebString& targetNodeName) {
+ process_memory_dump_->AddSuballocation(
+ base::trace_event::MemoryAllocatorDumpGuid(source),
+ targetNodeName.utf8());
+}
+
+SkTraceMemoryDump* WebProcessMemoryDumpImpl::CreateDumpAdapterForSkia(
+ const blink::WebString& dumpNamePrefix) {
+ sk_trace_dump_list_.push_back(new skia::SkTraceMemoryDump_Chrome(
+ dumpNamePrefix.utf8(), level_of_detail_, process_memory_dump_));
+ return sk_trace_dump_list_.back();
+}
+
} // namespace content
« no previous file with comments | « content/child/web_process_memory_dump_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698