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 <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "base/single_thread_task_runner.h" | 25 #include "base/single_thread_task_runner.h" |
26 #include "base/strings/string_number_conversions.h" | 26 #include "base/strings/string_number_conversions.h" |
27 #include "base/strings/string_split.h" | 27 #include "base/strings/string_split.h" |
28 #include "base/system_monitor/system_monitor.h" | 28 #include "base/system_monitor/system_monitor.h" |
29 #include "base/thread_task_runner_handle.h" | 29 #include "base/thread_task_runner_handle.h" |
30 #include "base/threading/thread_restrictions.h" | 30 #include "base/threading/thread_restrictions.h" |
31 #include "base/timer/hi_res_timer_manager.h" | 31 #include "base/timer/hi_res_timer_manager.h" |
32 #include "base/trace_event/memory_dump_manager.h" | 32 #include "base/trace_event/memory_dump_manager.h" |
33 #include "base/trace_event/trace_event.h" | 33 #include "base/trace_event/trace_event.h" |
34 #include "build/build_config.h" | 34 #include "build/build_config.h" |
| 35 #include "components/tracing/process_metrics_memory_dump_provider.h" |
35 #include "components/tracing/trace_config_file.h" | 36 #include "components/tracing/trace_config_file.h" |
36 #include "components/tracing/trace_to_console.h" | 37 #include "components/tracing/trace_to_console.h" |
37 #include "components/tracing/tracing_switches.h" | 38 #include "components/tracing/tracing_switches.h" |
38 #include "content/browser/browser_thread_impl.h" | 39 #include "content/browser/browser_thread_impl.h" |
39 #include "content/browser/device_sensors/device_inertial_sensor_service.h" | 40 #include "content/browser/device_sensors/device_inertial_sensor_service.h" |
40 #include "content/browser/dom_storage/dom_storage_area.h" | 41 #include "content/browser/dom_storage/dom_storage_area.h" |
41 #include "content/browser/download/save_file_manager.h" | 42 #include "content/browser/download/save_file_manager.h" |
42 #include "content/browser/gamepad/gamepad_service.h" | 43 #include "content/browser/gamepad/gamepad_service.h" |
43 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 44 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
44 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 45 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 | 697 |
697 if (parsed_command_line_.HasSwitch( | 698 if (parsed_command_line_.HasSwitch( |
698 switches::kEnableAggressiveDOMStorageFlushing)) { | 699 switches::kEnableAggressiveDOMStorageFlushing)) { |
699 TRACE_EVENT0("startup", | 700 TRACE_EVENT0("startup", |
700 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); | 701 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); |
701 DOMStorageArea::EnableAggressiveCommitDelay(); | 702 DOMStorageArea::EnableAggressiveCommitDelay(); |
702 } | 703 } |
703 | 704 |
704 // Enable memory-infra dump providers. | 705 // Enable memory-infra dump providers. |
705 InitSkiaEventTracer(); | 706 InitSkiaEventTracer(); |
| 707 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess( |
| 708 base::kNullProcessHandle); |
706 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 709 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
707 HostSharedBitmapManager::current(), "HostSharedBitmapManager", nullptr); | 710 HostSharedBitmapManager::current(), "HostSharedBitmapManager", nullptr); |
708 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 711 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
709 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); | 712 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); |
710 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 713 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
711 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr); | 714 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr); |
712 } | 715 } |
713 | 716 |
714 int BrowserMainLoop::PreCreateThreads() { | 717 int BrowserMainLoop::PreCreateThreads() { |
715 if (parts_) { | 718 if (parts_) { |
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1479 DCHECK(is_tracing_startup_for_duration_); | 1482 DCHECK(is_tracing_startup_for_duration_); |
1480 | 1483 |
1481 is_tracing_startup_for_duration_ = false; | 1484 is_tracing_startup_for_duration_ = false; |
1482 TracingController::GetInstance()->StopTracing( | 1485 TracingController::GetInstance()->StopTracing( |
1483 TracingController::CreateFileSink( | 1486 TracingController::CreateFileSink( |
1484 startup_trace_file_, | 1487 startup_trace_file_, |
1485 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1488 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1486 } | 1489 } |
1487 | 1490 |
1488 } // namespace content | 1491 } // namespace content |
OLD | NEW |