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

Side by Side Diff: third_party/WebKit/Source/platform/web_process_memory_dump.cc

Issue 2006943003: [tracing] Sanitize process memory dumps for background mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@whitelist_mdp
Patch Set: Fix stripping. Created 4 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProviderTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "platform/web_process_memory_dump.h" 5 #include "platform/web_process_memory_dump.h"
6 6
7 #include "base/memory/discardable_memory.h" 7 #include "base/memory/discardable_memory.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/trace_event/heap_profiler_heap_dump_writer.h" 10 #include "base/trace_event/heap_profiler_heap_dump_writer.h"
11 #include "base/trace_event/process_memory_dump.h" 11 #include "base/trace_event/process_memory_dump.h"
12 #include "base/trace_event/trace_event_argument.h" 12 #include "base/trace_event/trace_event_argument.h"
13 #include "base/trace_event/trace_event_memory_overhead.h" 13 #include "base/trace_event/trace_event_memory_overhead.h"
14 #include "platform/web_memory_allocator_dump.h" 14 #include "platform/web_memory_allocator_dump.h"
15 #include "skia/ext/skia_trace_memory_dump_impl.h" 15 #include "skia/ext/skia_trace_memory_dump_impl.h"
16 #include "wtf/text/StringUTF8Adaptor.h" 16 #include "wtf/text/StringUTF8Adaptor.h"
17 17
18 #include <stddef.h> 18 #include <stddef.h>
19 19
20 namespace blink { 20 namespace blink {
21 21
22 WebProcessMemoryDump::WebProcessMemoryDump() 22 WebProcessMemoryDump::WebProcessMemoryDump()
23 : owned_process_memory_dump_( 23 : owned_process_memory_dump_(
24 new base::trace_event::ProcessMemoryDump(nullptr)), 24 new base::trace_event::ProcessMemoryDump(nullptr, { base::trace_event: :MemoryDumpLevelOfDetail::DETAILED }))
25 process_memory_dump_(owned_process_memory_dump_.get()), 25 , process_memory_dump_(owned_process_memory_dump_.get())
26 level_of_detail_(base::trace_event::MemoryDumpLevelOfDetail::DETAILED) {} 26 , level_of_detail_(base::trace_event::MemoryDumpLevelOfDetail::DETAILED) {
27 }
27 28
28 WebProcessMemoryDump::WebProcessMemoryDump( 29 WebProcessMemoryDump::WebProcessMemoryDump(
29 base::trace_event::MemoryDumpLevelOfDetail level_of_detail, 30 base::trace_event::MemoryDumpLevelOfDetail level_of_detail,
30 base::trace_event::ProcessMemoryDump* process_memory_dump) 31 base::trace_event::ProcessMemoryDump* process_memory_dump)
31 : process_memory_dump_(process_memory_dump), 32 : process_memory_dump_(process_memory_dump),
32 level_of_detail_(level_of_detail) {} 33 level_of_detail_(level_of_detail) {}
33 34
34 WebProcessMemoryDump::~WebProcessMemoryDump() { 35 WebProcessMemoryDump::~WebProcessMemoryDump() {
35 } 36 }
36 37
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 180
180 void WebProcessMemoryDump::dumpHeapUsage( 181 void WebProcessMemoryDump::dumpHeapUsage(
181 const base::hash_map<base::trace_event::AllocationContext, 182 const base::hash_map<base::trace_event::AllocationContext,
182 base::trace_event::AllocationMetrics>& metrics_by_context, 183 base::trace_event::AllocationMetrics>& metrics_by_context,
183 base::trace_event::TraceEventMemoryOverhead& overhead, 184 base::trace_event::TraceEventMemoryOverhead& overhead,
184 const char* allocator_name) { 185 const char* allocator_name) {
185 process_memory_dump_->DumpHeapUsage(metrics_by_context, overhead, allocator_na me); 186 process_memory_dump_->DumpHeapUsage(metrics_by_context, overhead, allocator_na me);
186 } 187 }
187 188
188 } // namespace content 189 } // namespace content
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProviderTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698