OLD | NEW |
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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 | 659 |
660 if (parsed_command_line_.HasSwitch( | 660 if (parsed_command_line_.HasSwitch( |
661 switches::kEnableAggressiveDOMStorageFlushing)) { | 661 switches::kEnableAggressiveDOMStorageFlushing)) { |
662 TRACE_EVENT0("startup", | 662 TRACE_EVENT0("startup", |
663 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); | 663 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); |
664 DOMStorageArea::EnableAggressiveCommitDelay(); | 664 DOMStorageArea::EnableAggressiveCommitDelay(); |
665 } | 665 } |
666 | 666 |
667 // Enable memory-infra dump providers. | 667 // Enable memory-infra dump providers. |
668 InitSkiaEventTracer(); | 668 InitSkiaEventTracer(); |
| 669 base::trace_event::MemoryDumpManager::GetInstance() |
| 670 ->RegisterProcessMetricsProvidersFor(base::GetCurrentProcessHandle()); |
669 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 671 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
670 HostSharedBitmapManager::current(), "HostSharedBitmapManager", nullptr); | 672 HostSharedBitmapManager::current(), "HostSharedBitmapManager", nullptr); |
671 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 673 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
672 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); | 674 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); |
673 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 675 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
674 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr); | 676 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr); |
675 | 677 |
676 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) | 678 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) |
677 trace_memory_controller_.reset(new base::trace_event::TraceMemoryController( | 679 trace_memory_controller_.reset(new base::trace_event::TraceMemoryController( |
678 base::MessageLoop::current()->task_runner(), | 680 base::MessageLoop::current()->task_runner(), |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1424 DCHECK(is_tracing_startup_for_duration_); | 1426 DCHECK(is_tracing_startup_for_duration_); |
1425 | 1427 |
1426 is_tracing_startup_for_duration_ = false; | 1428 is_tracing_startup_for_duration_ = false; |
1427 TracingController::GetInstance()->DisableRecording( | 1429 TracingController::GetInstance()->DisableRecording( |
1428 TracingController::CreateFileSink( | 1430 TracingController::CreateFileSink( |
1429 startup_trace_file_, | 1431 startup_trace_file_, |
1430 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1432 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1431 } | 1433 } |
1432 | 1434 |
1433 } // namespace content | 1435 } // namespace content |
OLD | NEW |