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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 2884143002: Revert "[Memory-UMA] Implement basic working prototype." (Closed)
Patch Set: Created 3 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 } 790 }
791 791
792 if (parsed_command_line_.HasSwitch( 792 if (parsed_command_line_.HasSwitch(
793 switches::kEnableAggressiveDOMStorageFlushing)) { 793 switches::kEnableAggressiveDOMStorageFlushing)) {
794 TRACE_EVENT0("startup", 794 TRACE_EVENT0("startup",
795 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); 795 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay");
796 DOMStorageArea::EnableAggressiveCommitDelay(); 796 DOMStorageArea::EnableAggressiveCommitDelay();
797 LevelDBWrapperImpl::EnableAggressiveCommitDelay(); 797 LevelDBWrapperImpl::EnableAggressiveCommitDelay();
798 } 798 }
799 799
800 // Create the memory instrumentation service. It will initialize the memory
801 // dump manager, too. It makes sense that BrowserMainLoop owns the service;
802 // this way, the service is alive for the lifetime of Mojo. Mojo is shutdown
803 // in BrowserMainLoop::ShutdownThreadsAndCleanupIO.
804 memory_instrumentation_coordinator_ =
805 base::MakeUnique<memory_instrumentation::CoordinatorImpl>(
806 true /* initialize_memory_dump_manager */);
807
800 // Enable memory-infra dump providers. 808 // Enable memory-infra dump providers.
801 InitSkiaEventTracer(); 809 InitSkiaEventTracer();
802 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess( 810 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess(
803 base::kNullProcessId); 811 base::kNullProcessId);
804 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 812 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
805 display_compositor::HostSharedBitmapManager::current(), 813 display_compositor::HostSharedBitmapManager::current(),
806 "display_compositor::HostSharedBitmapManager", nullptr); 814 "display_compositor::HostSharedBitmapManager", nullptr);
807 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 815 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
808 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); 816 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr);
809 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 817 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 } 1392 }
1385 1393
1386 int BrowserMainLoop::BrowserThreadsStarted() { 1394 int BrowserMainLoop::BrowserThreadsStarted() {
1387 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted"); 1395 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted");
1388 1396
1389 // Bring up Mojo IPC and the embedded Service Manager as early as possible. 1397 // Bring up Mojo IPC and the embedded Service Manager as early as possible.
1390 // Initializaing mojo requires the IO thread to have been initialized first, 1398 // Initializaing mojo requires the IO thread to have been initialized first,
1391 // so this cannot happen any earlier than now. 1399 // so this cannot happen any earlier than now.
1392 InitializeMojo(); 1400 InitializeMojo();
1393 1401
1394 // Create the memory instrumentation service. It will initialize the memory
1395 // dump manager, too. It makes sense that BrowserMainLoop owns the service;
1396 // this way, the service is alive for the lifetime of Mojo. Mojo is shutdown
1397 // in BrowserMainLoop::ShutdownThreadsAndCleanupIO.
1398 memory_instrumentation_coordinator_ =
1399 base::MakeUnique<memory_instrumentation::CoordinatorImpl>(
1400 true /* initialize_memory_dump_manager */,
1401 content::ServiceManagerConnection::GetForProcess()->GetConnector());
1402
1403 #if defined(USE_AURA) 1402 #if defined(USE_AURA)
1404 if (service_manager::ServiceManagerIsRemote()) { 1403 if (service_manager::ServiceManagerIsRemote()) {
1405 base::CommandLine::ForCurrentProcess()->AppendSwitch( 1404 base::CommandLine::ForCurrentProcess()->AppendSwitch(
1406 switches::kIsRunningInMash); 1405 switches::kIsRunningInMash);
1407 } 1406 }
1408 #endif 1407 #endif
1409 1408
1410 indexed_db_thread_.reset(new base::Thread("IndexedDB")); 1409 indexed_db_thread_.reset(new base::Thread("IndexedDB"));
1411 indexed_db_thread_->Start(); 1410 indexed_db_thread_->Start();
1412 1411
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1776 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), 1775 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
1777 MediaInternals::GetInstance()); 1776 MediaInternals::GetInstance());
1778 } 1777 }
1779 CHECK(audio_manager_); 1778 CHECK(audio_manager_);
1780 1779
1781 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); 1780 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get());
1782 CHECK(audio_system_); 1781 CHECK(audio_system_);
1783 } 1782 }
1784 1783
1785 } // namespace content 1784 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698