Chromium Code Reviews| OLD | NEW |
|---|---|
| 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" | |
|
ssid
2015/09/04 08:54:00
Also, deps addition is not required, it is already
| |
| 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 Loading... | |
| 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 SkTraceMemoryDump* WebProcessMemoryDumpImpl::CreateSkiaTraceMemoryDump( | |
| 137 const blink::WebString& dumpNamePrefix) { | |
| 138 sk_trace_dump_.reset(new skia::SkTraceMemoryDump_Chrome( | |
|
Primiano Tucci (use gerrit)
2015/09/04 10:02:16
Hmm if you store it into a scoped_ptr implies that
ssid
2015/09/07 17:29:53
Done.
| |
| 139 dumpNamePrefix.utf8().data(), process_memory_dump_)); | |
| 140 return sk_trace_dump_.get(); | |
| 141 } | |
| 142 | |
| 135 } // namespace content | 143 } // namespace content |
| OLD | NEW |