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

Side by Side Diff: base/trace_event/memory_dump_manager.cc

Issue 1275013005: [tracing] Disable memory maps dump provider for security reason (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enable for telemetry. Created 5 years, 4 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 | « no previous file | 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 "base/trace_event/memory_dump_manager.h" 5 #include "base/trace_event/memory_dump_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 void MemoryDumpManager::Initialize() { 109 void MemoryDumpManager::Initialize() {
110 TRACE_EVENT0(kTraceCategory, "init"); // Add to trace-viewer category list. 110 TRACE_EVENT0(kTraceCategory, "init"); // Add to trace-viewer category list.
111 trace_event::TraceLog::GetInstance()->AddEnabledStateObserver(this); 111 trace_event::TraceLog::GetInstance()->AddEnabledStateObserver(this);
112 112
113 if (skip_core_dumpers_auto_registration_for_testing_) 113 if (skip_core_dumpers_auto_registration_for_testing_)
114 return; 114 return;
115 115
116 // Enable the core dump providers. 116 // Enable the core dump providers.
117 #if !defined(OS_NACL) 117 #if !defined(OS_NACL)
118 RegisterDumpProvider(ProcessMemoryTotalsDumpProvider::GetInstance()); 118 // The memory maps dump provider is currently disabled for security reasons
119 // and will be enabled once tracing is more secure. It is still enabled for
120 // running benchmarks.
121 if (CommandLine::ForCurrentProcess()->HasSwitch("enable-memory-benchmarking"))
122 RegisterDumpProvider(ProcessMemoryTotalsDumpProvider::GetInstance());
119 #endif 123 #endif
120 124
121 #if defined(OS_LINUX) || defined(OS_ANDROID) 125 #if defined(OS_LINUX) || defined(OS_ANDROID)
122 RegisterDumpProvider(ProcessMemoryMapsDumpProvider::GetInstance()); 126 RegisterDumpProvider(ProcessMemoryMapsDumpProvider::GetInstance());
dsinclair 2015/08/07 15:28:25 Don't the rest of these also need to be disabled?
123 RegisterDumpProvider(MallocDumpProvider::GetInstance()); 127 RegisterDumpProvider(MallocDumpProvider::GetInstance());
124 system_allocator_pool_name_ = MallocDumpProvider::kAllocatedObjects; 128 system_allocator_pool_name_ = MallocDumpProvider::kAllocatedObjects;
125 #endif 129 #endif
126 130
127 #if defined(OS_ANDROID) 131 #if defined(OS_ANDROID)
128 RegisterDumpProvider(JavaHeapDumpProvider::GetInstance()); 132 RegisterDumpProvider(JavaHeapDumpProvider::GetInstance());
129 #endif 133 #endif
130 134
131 #if defined(OS_WIN) 135 #if defined(OS_WIN)
132 RegisterDumpProvider(WinHeapDumpProvider::GetInstance()); 136 RegisterDumpProvider(WinHeapDumpProvider::GetInstance());
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 next_dump_provider(next_dump_provider), 474 next_dump_provider(next_dump_provider),
471 callback(callback), 475 callback(callback),
472 task_runner(MessageLoop::current()->task_runner()) { 476 task_runner(MessageLoop::current()->task_runner()) {
473 } 477 }
474 478
475 MemoryDumpManager::ProcessMemoryDumpAsyncState::~ProcessMemoryDumpAsyncState() { 479 MemoryDumpManager::ProcessMemoryDumpAsyncState::~ProcessMemoryDumpAsyncState() {
476 } 480 }
477 481
478 } // namespace trace_event 482 } // namespace trace_event
479 } // namespace base 483 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698