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

Side by Side 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 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 #include "content/child/web_process_memory_dump_impl.h" 5 #include "content/child/web_process_memory_dump_impl.h"
6 6
7 #include "base/trace_event/process_memory_dump.h" 7 #include "base/trace_event/process_memory_dump.h"
8 #include "content/child/web_memory_allocator_dump_impl.h" 8 #include "content/child/web_memory_allocator_dump_impl.h"
9 #include "skia/ext/SkTraceMemoryDump_chrome.h"
9 10
10 namespace content { 11 namespace content {
11 12
12 WebProcessMemoryDumpImpl::WebProcessMemoryDumpImpl() 13 WebProcessMemoryDumpImpl::WebProcessMemoryDumpImpl()
13 : owned_process_memory_dump_( 14 : owned_process_memory_dump_(
14 new base::trace_event::ProcessMemoryDump(nullptr)), 15 new base::trace_event::ProcessMemoryDump(nullptr)),
15 process_memory_dump_(owned_process_memory_dump_.get()) { 16 process_memory_dump_(owned_process_memory_dump_.get()) {
16 } 17 }
17 18
18 WebProcessMemoryDumpImpl::WebProcessMemoryDumpImpl( 19 WebProcessMemoryDumpImpl::WebProcessMemoryDumpImpl(
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 126 }
126 127
127 void WebProcessMemoryDumpImpl::AddOwnershipEdge( 128 void WebProcessMemoryDumpImpl::AddOwnershipEdge(
128 blink::WebMemoryAllocatorDumpGuid source, 129 blink::WebMemoryAllocatorDumpGuid source,
129 blink::WebMemoryAllocatorDumpGuid target) { 130 blink::WebMemoryAllocatorDumpGuid target) {
130 process_memory_dump_->AddOwnershipEdge( 131 process_memory_dump_->AddOwnershipEdge(
131 base::trace_event::MemoryAllocatorDumpGuid(source), 132 base::trace_event::MemoryAllocatorDumpGuid(source),
132 base::trace_event::MemoryAllocatorDumpGuid(target)); 133 base::trace_event::MemoryAllocatorDumpGuid(target));
133 } 134 }
134 135
136 void WebProcessMemoryDumpImpl::AddSuballocation(
137 blink::WebMemoryAllocatorDumpGuid source,
138 const blink::WebString& targetNodeName) {
139 process_memory_dump_->AddSuballocation(
140 base::trace_event::MemoryAllocatorDumpGuid(source),
141 targetNodeName.utf8());
142 }
143
144 SkTraceMemoryDump* WebProcessMemoryDumpImpl::CreateDumpAdapterForSkia(
145 blink::WebMemoryDumpLevelOfDetail levelOfDetail,
Primiano Tucci (use gerrit) 2015/09/09 17:21:36 Wait I realized only now: you don't seem to make a
ssid 2015/09/10 11:08:26 I have uploaded the Cl in skia impl to add one mor
146 const blink::WebString& dumpNamePrefix) {
147 sk_trace_dump_list_.push_back(new skia::SkTraceMemoryDump_Chrome(
148 dumpNamePrefix.utf8().data(), process_memory_dump_));
Primiano Tucci (use gerrit) 2015/09/09 16:16:41 I realized this just now, but would have been a bi
ssid 2015/09/10 11:08:26 hm, okay. Will fix this in next CL. Thanks
149 return sk_trace_dump_list_.back();
150 }
151
135 } // namespace content 152 } // namespace content
OLDNEW
« content/child/web_process_memory_dump_impl.h ('K') | « 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