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

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

Issue 1383733002: [tracing] Add graphics memory dump provider for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 2 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 "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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 #include "content/public/browser/context_factory.h" 81 #include "content/public/browser/context_factory.h"
82 #include "ui/aura/env.h" 82 #include "ui/aura/env.h"
83 #endif 83 #endif
84 84
85 #if !defined(OS_IOS) 85 #if !defined(OS_IOS)
86 #include "content/browser/renderer_host/render_process_host_impl.h" 86 #include "content/browser/renderer_host/render_process_host_impl.h"
87 #endif 87 #endif
88 88
89 #if defined(OS_ANDROID) 89 #if defined(OS_ANDROID)
90 #include "base/android/jni_android.h" 90 #include "base/android/jni_android.h"
91 #include "components/tracing/graphics_memory_dump_provider_android.h"
91 #include "content/browser/android/browser_startup_controller.h" 92 #include "content/browser/android/browser_startup_controller.h"
92 #include "content/browser/android/browser_surface_texture_manager.h" 93 #include "content/browser/android/browser_surface_texture_manager.h"
93 #include "content/browser/android/in_process_surface_texture_manager.h" 94 #include "content/browser/android/in_process_surface_texture_manager.h"
94 #include "content/browser/android/tracing_controller_android.h" 95 #include "content/browser/android/tracing_controller_android.h"
95 #include "content/browser/screen_orientation/screen_orientation_delegate_android .h" 96 #include "content/browser/screen_orientation/screen_orientation_delegate_android .h"
96 #include "content/public/browser/screen_orientation_provider.h" 97 #include "content/public/browser/screen_orientation_provider.h"
97 #include "ui/gl/gl_surface.h" 98 #include "ui/gl/gl_surface.h"
98 #endif 99 #endif
99 100
100 #if defined(OS_MACOSX) 101 #if defined(OS_MACOSX)
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 int BrowserMainLoop::BrowserThreadsStarted() { 1141 int BrowserMainLoop::BrowserThreadsStarted() {
1141 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted"); 1142 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted");
1142 1143
1143 #if !defined(OS_IOS) 1144 #if !defined(OS_IOS)
1144 indexed_db_thread_.reset(new base::Thread("IndexedDB")); 1145 indexed_db_thread_.reset(new base::Thread("IndexedDB"));
1145 indexed_db_thread_->Start(); 1146 indexed_db_thread_->Start();
1146 #endif 1147 #endif
1147 1148
1148 #if !defined(OS_IOS) 1149 #if !defined(OS_IOS)
1149 HistogramSynchronizer::GetInstance(); 1150 HistogramSynchronizer::GetInstance();
1150
1151 #if defined(OS_ANDROID) 1151 #if defined(OS_ANDROID)
1152 // Up the priority of the UI thread. 1152 // Up the priority of the UI thread.
1153 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); 1153 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
1154 #endif 1154 #endif
1155 1155
1156 bool always_uses_gpu = true; 1156 bool always_uses_gpu = true;
1157 bool established_gpu_channel = false; 1157 bool established_gpu_channel = false;
1158 #if defined(OS_ANDROID) 1158 #if defined(OS_ANDROID)
1159 // TODO(crbug.com/439322): This should be set to |true|. 1159 // TODO(crbug.com/439322): This should be set to |true|.
1160 established_gpu_channel = false; 1160 established_gpu_channel = false;
(...skipping 11 matching lines...) Expand all
1172 aura::Env::GetInstance()->set_context_factory(GetContextFactory()); 1172 aura::Env::GetInstance()->set_context_factory(GetContextFactory());
1173 } 1173 }
1174 #endif // defined(USE_AURA) 1174 #endif // defined(USE_AURA)
1175 #endif // defined(OS_ANDROID) 1175 #endif // defined(OS_ANDROID)
1176 1176
1177 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that 1177 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that
1178 // unregistration happens on the IO thread (See 1178 // unregistration happens on the IO thread (See
1179 // BrowserProcessSubThread::IOThreadPreCleanUp). 1179 // BrowserProcessSubThread::IOThreadPreCleanUp).
1180 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 1180 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
1181 BrowserGpuMemoryBufferManager::current(), io_thread_->task_runner()); 1181 BrowserGpuMemoryBufferManager::current(), io_thread_->task_runner());
1182 #if defined(OS_ANDROID)
1183 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
1184 tracing::GraphicsMemoryDumpProvider::GetInstance());
1185 #endif
1182 1186
1183 { 1187 {
1184 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:AudioMan"); 1188 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:AudioMan");
1185 audio_manager_.reset(media::AudioManager::CreateWithHangTimer( 1189 audio_manager_.reset(media::AudioManager::CreateWithHangTimer(
1186 MediaInternals::GetInstance(), io_thread_->task_runner())); 1190 MediaInternals::GetInstance(), io_thread_->task_runner()));
1187 } 1191 }
1188 1192
1189 { 1193 {
1190 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:MidiManager"); 1194 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:MidiManager");
1191 midi_manager_.reset(media::midi::MidiManager::Create()); 1195 midi_manager_.reset(media::midi::MidiManager::Create());
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 DCHECK(is_tracing_startup_for_duration_); 1405 DCHECK(is_tracing_startup_for_duration_);
1402 1406
1403 is_tracing_startup_for_duration_ = false; 1407 is_tracing_startup_for_duration_ = false;
1404 TracingController::GetInstance()->DisableRecording( 1408 TracingController::GetInstance()->DisableRecording(
1405 TracingController::CreateFileSink( 1409 TracingController::CreateFileSink(
1406 startup_trace_file_, 1410 startup_trace_file_,
1407 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1411 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1408 } 1412 }
1409 1413
1410 } // namespace content 1414 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698