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" | 9 #include "skia/ext/SkTraceMemoryDump_chrome.h" |
10 | 10 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 blink::WebMemoryAllocatorDumpGuid source, | 137 blink::WebMemoryAllocatorDumpGuid source, |
138 const blink::WebString& targetNodeName) { | 138 const blink::WebString& targetNodeName) { |
139 process_memory_dump_->AddSuballocation( | 139 process_memory_dump_->AddSuballocation( |
140 base::trace_event::MemoryAllocatorDumpGuid(source), | 140 base::trace_event::MemoryAllocatorDumpGuid(source), |
141 targetNodeName.utf8()); | 141 targetNodeName.utf8()); |
142 } | 142 } |
143 | 143 |
144 SkTraceMemoryDump* WebProcessMemoryDumpImpl::CreateDumpAdapterForSkia( | 144 SkTraceMemoryDump* WebProcessMemoryDumpImpl::CreateDumpAdapterForSkia( |
145 blink::WebMemoryDumpLevelOfDetail levelOfDetail, | 145 blink::WebMemoryDumpLevelOfDetail levelOfDetail, |
146 const blink::WebString& dumpNamePrefix) { | 146 const blink::WebString& dumpNamePrefix) { |
| 147 base::trace_event::MemoryDumpArgs args = { |
| 148 levelOfDetail == blink::WebMemoryDumpLevelOfDetail::Low |
| 149 ? base::trace_event::MemoryDumpArgs::LevelOfDetail::LOW |
| 150 : base::trace_event::MemoryDumpArgs::LevelOfDetail::HIGH}; |
147 sk_trace_dump_list_.push_back(new skia::SkTraceMemoryDump_Chrome( | 151 sk_trace_dump_list_.push_back(new skia::SkTraceMemoryDump_Chrome( |
148 dumpNamePrefix.utf8().data(), process_memory_dump_)); | 152 dumpNamePrefix.utf8().data(), args, process_memory_dump_)); |
149 return sk_trace_dump_list_.back(); | 153 return sk_trace_dump_list_.back(); |
150 } | 154 } |
151 | 155 |
152 } // namespace content | 156 } // namespace content |
OLD | NEW |