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

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: Add memtrack to column name 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
« no previous file with comments | « components/tracing/graphics_memory_dump_provider_android.cc ('k') | content/gpu/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 #include "content/public/browser/context_factory.h" 82 #include "content/public/browser/context_factory.h"
83 #include "ui/aura/env.h" 83 #include "ui/aura/env.h"
84 #endif 84 #endif
85 85
86 #if !defined(OS_IOS) 86 #if !defined(OS_IOS)
87 #include "content/browser/renderer_host/render_process_host_impl.h" 87 #include "content/browser/renderer_host/render_process_host_impl.h"
88 #endif 88 #endif
89 89
90 #if defined(OS_ANDROID) 90 #if defined(OS_ANDROID)
91 #include "base/android/jni_android.h" 91 #include "base/android/jni_android.h"
92 #include "components/tracing/graphics_memory_dump_provider_android.h"
92 #include "content/browser/android/browser_startup_controller.h" 93 #include "content/browser/android/browser_startup_controller.h"
93 #include "content/browser/android/browser_surface_texture_manager.h" 94 #include "content/browser/android/browser_surface_texture_manager.h"
94 #include "content/browser/android/in_process_surface_texture_manager.h" 95 #include "content/browser/android/in_process_surface_texture_manager.h"
95 #include "content/browser/android/tracing_controller_android.h" 96 #include "content/browser/android/tracing_controller_android.h"
96 #include "content/browser/screen_orientation/screen_orientation_delegate_android .h" 97 #include "content/browser/screen_orientation/screen_orientation_delegate_android .h"
97 #include "content/public/browser/screen_orientation_provider.h" 98 #include "content/public/browser/screen_orientation_provider.h"
98 #include "ui/gl/gl_surface.h" 99 #include "ui/gl/gl_surface.h"
99 #endif 100 #endif
100 101
101 #if defined(OS_MACOSX) 102 #if defined(OS_MACOSX)
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 int BrowserMainLoop::BrowserThreadsStarted() { 1151 int BrowserMainLoop::BrowserThreadsStarted() {
1151 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted"); 1152 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted");
1152 1153
1153 #if !defined(OS_IOS) 1154 #if !defined(OS_IOS)
1154 indexed_db_thread_.reset(new base::Thread("IndexedDB")); 1155 indexed_db_thread_.reset(new base::Thread("IndexedDB"));
1155 indexed_db_thread_->Start(); 1156 indexed_db_thread_->Start();
1156 #endif 1157 #endif
1157 1158
1158 #if !defined(OS_IOS) 1159 #if !defined(OS_IOS)
1159 HistogramSynchronizer::GetInstance(); 1160 HistogramSynchronizer::GetInstance();
1160
1161 #if defined(OS_ANDROID) 1161 #if defined(OS_ANDROID)
1162 // Up the priority of the UI thread. 1162 // Up the priority of the UI thread.
1163 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); 1163 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
1164 #endif 1164 #endif
1165 1165
1166 bool always_uses_gpu = true; 1166 bool always_uses_gpu = true;
1167 bool established_gpu_channel = false; 1167 bool established_gpu_channel = false;
1168 #if defined(OS_ANDROID) 1168 #if defined(OS_ANDROID)
1169 // TODO(crbug.com/439322): This should be set to |true|. 1169 // TODO(crbug.com/439322): This should be set to |true|.
1170 established_gpu_channel = false; 1170 established_gpu_channel = false;
(...skipping 11 matching lines...) Expand all
1182 aura::Env::GetInstance()->set_context_factory(GetContextFactory()); 1182 aura::Env::GetInstance()->set_context_factory(GetContextFactory());
1183 } 1183 }
1184 #endif // defined(USE_AURA) 1184 #endif // defined(USE_AURA)
1185 #endif // defined(OS_ANDROID) 1185 #endif // defined(OS_ANDROID)
1186 1186
1187 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that 1187 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that
1188 // unregistration happens on the IO thread (See 1188 // unregistration happens on the IO thread (See
1189 // BrowserProcessSubThread::IOThreadPreCleanUp). 1189 // BrowserProcessSubThread::IOThreadPreCleanUp).
1190 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 1190 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
1191 BrowserGpuMemoryBufferManager::current(), io_thread_->task_runner()); 1191 BrowserGpuMemoryBufferManager::current(), io_thread_->task_runner());
1192 #if defined(OS_ANDROID)
1193 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
1194 tracing::GraphicsMemoryDumpProvider::GetInstance());
1195 #endif
1192 1196
1193 { 1197 {
1194 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:AudioMan"); 1198 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:AudioMan");
1195 audio_manager_.reset(media::AudioManager::CreateWithHangTimer( 1199 audio_manager_.reset(media::AudioManager::CreateWithHangTimer(
1196 MediaInternals::GetInstance(), io_thread_->task_runner())); 1200 MediaInternals::GetInstance(), io_thread_->task_runner()));
1197 } 1201 }
1198 1202
1199 { 1203 {
1200 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:MidiManager"); 1204 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:MidiManager");
1201 midi_manager_.reset(media::midi::MidiManager::Create()); 1205 midi_manager_.reset(media::midi::MidiManager::Create());
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 DCHECK(is_tracing_startup_for_duration_); 1415 DCHECK(is_tracing_startup_for_duration_);
1412 1416
1413 is_tracing_startup_for_duration_ = false; 1417 is_tracing_startup_for_duration_ = false;
1414 TracingController::GetInstance()->DisableRecording( 1418 TracingController::GetInstance()->DisableRecording(
1415 TracingController::CreateFileSink( 1419 TracingController::CreateFileSink(
1416 startup_trace_file_, 1420 startup_trace_file_,
1417 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1421 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1418 } 1422 }
1419 1423
1420 } // namespace content 1424 } // namespace content
OLDNEW
« no previous file with comments | « components/tracing/graphics_memory_dump_provider_android.cc ('k') | content/gpu/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698