diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-18 02:28:15 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-18 02:28:15 +0000 |
commit | d13f35da2d73cca3d7de8ca35b9a8cb4d668264a (patch) | |
tree | 64981e6fc6b35ba94b29d6c239aa83c3b36da246 | |
parent | 92059432cf8f8b2ae19c07494efdd859955ff38b (diff) | |
download | chromium_src-d13f35da2d73cca3d7de8ca35b9a8cb4d668264a.zip chromium_src-d13f35da2d73cca3d7de8ca35b9a8cb4d668264a.tar.gz chromium_src-d13f35da2d73cca3d7de8ca35b9a8cb4d668264a.tar.bz2 |
Add trace events to measure GPU process startup timing and time to first present.
Review URL: https://chromiumcodereview.appspot.com/10386185
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137802 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/browser/gpu/gpu_process_host.cc | 27 | ||||
-rw-r--r-- | content/common/gpu/client/gpu_channel_host.cc | 10 | ||||
-rw-r--r-- | content/common/gpu/gpu_channel.cc | 10 | ||||
-rw-r--r-- | content/gpu/gpu_info_collector_linux.cc | 3 | ||||
-rw-r--r-- | content/gpu/gpu_info_collector_mac.mm | 3 | ||||
-rw-r--r-- | content/gpu/gpu_info_collector_win.cc | 15 | ||||
-rw-r--r-- | content/gpu/gpu_main.cc | 77 | ||||
-rw-r--r-- | content/renderer/render_thread_impl.cc | 7 | ||||
-rw-r--r-- | ui/gl/gl_surface.cc | 3 | ||||
-rw-r--r-- | ui/surface/accelerated_surface_win.cc | 22 |
10 files changed, 129 insertions, 48 deletions
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc index 2dab6a4..305419b 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -358,6 +358,8 @@ GpuProcessHost::~GpuProcessHost() { bool GpuProcessHost::Init() { init_start_time_ = base::TimeTicks::Now(); + TRACE_EVENT_INSTANT0("gpu", "LaunchGpuProcess"); + std::string channel_id = process_->GetHost()->CreateChannel(); if (channel_id.empty()) return false; @@ -433,6 +435,8 @@ bool GpuProcessHost::OnMessageReceived(const IPC::Message& message) { } void GpuProcessHost::OnChannelConnected(int32 peer_pid) { + TRACE_EVENT0("gpu", "GpuProcessHostUIShim::OnChannelConnected"); + while (!queued_messages_.empty()) { Send(queued_messages_.front()); queued_messages_.pop(); @@ -469,6 +473,8 @@ void GpuProcessHost::CreateViewCommandBuffer( int client_id, const GPUCreateCommandBufferConfig& init_params, const CreateCommandBufferCallback& callback) { + TRACE_EVENT0("gpu", "GpuProcessHostUIShim::CreateViewCommandBuffer"); + DCHECK(CalledOnValidThread()); #if defined(TOOLKIT_GTK) @@ -498,6 +504,8 @@ void GpuProcessHost::CreateViewCommandBuffer( void GpuProcessHost::OnChannelEstablished( const IPC::ChannelHandle& channel_handle) { + TRACE_EVENT0("gpu", "GpuProcessHostUIShim::OnChannelEstablished"); + EstablishChannelCallback callback = channel_requests_.front(); channel_requests_.pop(); @@ -522,6 +530,8 @@ void GpuProcessHost::OnChannelEstablished( } void GpuProcessHost::OnCommandBufferCreated(const int32 route_id) { + TRACE_EVENT0("gpu", "GpuProcessHostUIShim::OnCommandBufferCreated"); + if (!create_command_buffer_requests_.empty()) { CreateCommandBufferCallback callback = create_command_buffer_requests_.front(); @@ -534,6 +544,8 @@ void GpuProcessHost::OnCommandBufferCreated(const int32 route_id) { } void GpuProcessHost::OnDestroyCommandBuffer(int32 surface_id) { + TRACE_EVENT0("gpu", "GpuProcessHostUIShim::OnDestroyCommandBuffer"); + #if defined(TOOLKIT_GTK) SurfaceRefMap::iterator it = surface_refs_.find(surface_id); if (it != surface_refs_.end()) @@ -544,8 +556,7 @@ void GpuProcessHost::OnDestroyCommandBuffer(int32 surface_id) { #if defined(OS_MACOSX) void GpuProcessHost::OnAcceleratedSurfaceBuffersSwapped( const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params) { - TRACE_EVENT0("renderer", - "GpuProcessHost::OnAcceleratedSurfaceBuffersSwapped"); + TRACE_EVENT0("gpu", "GpuProcessHost::OnAcceleratedSurfaceBuffersSwapped"); gfx::PluginWindowHandle handle = GpuSurfaceTracker::Get()->GetSurfaceWindowHandle(params.surface_id); @@ -590,8 +601,7 @@ void GpuProcessHost::OnAcceleratedSurfaceBuffersSwapped( void GpuProcessHost::OnAcceleratedSurfaceBuffersSwapped( const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params) { - TRACE_EVENT0("renderer", - "GpuProcessHost::OnAcceleratedSurfaceBuffersSwapped"); + TRACE_EVENT0("gpu", "GpuProcessHost::OnAcceleratedSurfaceBuffersSwapped"); base::ScopedClosureRunner scoped_completion_runner( base::Bind(&AcceleratedSurfaceBuffersSwappedCompleted, @@ -620,15 +630,13 @@ void GpuProcessHost::OnAcceleratedSurfaceBuffersSwapped( void GpuProcessHost::OnAcceleratedSurfacePostSubBuffer( const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params) { - TRACE_EVENT0("renderer", - "GpuProcessHost::OnAcceleratedSurfacePostSubBuffer"); + TRACE_EVENT0("gpu", "GpuProcessHost::OnAcceleratedSurfacePostSubBuffer"); NOTIMPLEMENTED(); } void GpuProcessHost::OnAcceleratedSurfaceSuspend(int32 surface_id) { - TRACE_EVENT0("renderer", - "GpuProcessHost::OnAcceleratedSurfaceSuspend"); + TRACE_EVENT0("gpu", "GpuProcessHost::OnAcceleratedSurfaceSuspend"); gfx::PluginWindowHandle handle = GpuSurfaceTracker::Get()->GetSurfaceWindowHandle(surface_id); @@ -645,8 +653,7 @@ void GpuProcessHost::OnAcceleratedSurfaceSuspend(int32 surface_id) { void GpuProcessHost::OnAcceleratedSurfaceRelease( const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) { - TRACE_EVENT0("renderer", - "GpuProcessHost::OnAcceleratedSurfaceRelease"); + TRACE_EVENT0("gpu", "GpuProcessHost::OnAcceleratedSurfaceRelease"); gfx::PluginWindowHandle handle = GpuSurfaceTracker::Get()->GetSurfaceWindowHandle(params.surface_id); diff --git a/content/common/gpu/client/gpu_channel_host.cc b/content/common/gpu/client/gpu_channel_host.cc index 19a87df..6d688c6 100644 --- a/content/common/gpu/client/gpu_channel_host.cc +++ b/content/common/gpu/client/gpu_channel_host.cc @@ -5,6 +5,7 @@ #include "content/common/gpu/client/gpu_channel_host.h" #include "base/bind.h" +#include "base/debug/trace_event.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" #include "base/threading/thread_restrictions.h" @@ -112,6 +113,11 @@ CommandBufferProxy* GpuChannelHost::CreateViewCommandBuffer( const std::vector<int32>& attribs, const GURL& active_url, gfx::GpuPreference gpu_preference) { + TRACE_EVENT1("gpu", + "GpuChannelHost::CreateViewCommandBuffer", + "surface_id", + surface_id); + #if defined(ENABLE_GPU) AutoLock lock(context_lock_); // An error occurred. Need to get the host again to reinitialize it. @@ -146,6 +152,8 @@ CommandBufferProxy* GpuChannelHost::CreateOffscreenCommandBuffer( const std::vector<int32>& attribs, const GURL& active_url, gfx::GpuPreference gpu_preference) { + TRACE_EVENT0("gpu", "GpuChannelHost::CreateOffscreenCommandBuffer"); + #if defined(ENABLE_GPU) AutoLock lock(context_lock_); // An error occurred. Need to get the host again to reinitialize it. @@ -192,6 +200,8 @@ GpuVideoDecodeAcceleratorHost* GpuChannelHost::CreateVideoDecoder( void GpuChannelHost::DestroyCommandBuffer( CommandBufferProxy* command_buffer) { + TRACE_EVENT0("gpu", "GpuChannelHost::DestroyCommandBuffer"); + #if defined(ENABLE_GPU) AutoLock lock(context_lock_); int route_id = command_buffer->GetRouteID(); diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc index a228305..41d86ba 100644 --- a/content/common/gpu/gpu_channel.cc +++ b/content/common/gpu/gpu_channel.cc @@ -179,6 +179,11 @@ void GpuChannel::CreateViewCommandBuffer( int32 surface_id, const GPUCreateCommandBufferConfig& init_params, int32* route_id) { + TRACE_EVENT1("gpu", + "GpuChannel::CreateViewCommandBuffer", + "surface_id", + surface_id); + *route_id = MSG_ROUTING_NONE; content::GetContentClient()->SetActiveURL(init_params.active_url); @@ -336,6 +341,8 @@ void GpuChannel::OnCreateOffscreenCommandBuffer( const gfx::Size& size, const GPUCreateCommandBufferConfig& init_params, IPC::Message* reply_message) { + TRACE_EVENT0("gpu", "GpuChannel::OnCreateOffscreenCommandBuffer"); + int32 route_id = MSG_ROUTING_NONE; content::GetContentClient()->SetActiveURL(init_params.active_url); @@ -373,9 +380,9 @@ void GpuChannel::OnCreateOffscreenCommandBuffer( void GpuChannel::OnDestroyCommandBuffer(int32 route_id, IPC::Message* reply_message) { -#if defined(ENABLE_GPU) TRACE_EVENT1("gpu", "GpuChannel::OnDestroyCommandBuffer", "route_id", route_id); + if (router_.ResolveRoute(route_id)) { GpuCommandBufferStub* stub = stubs_.Lookup(route_id); bool need_reschedule = (stub && !stub->IsScheduled()); @@ -389,7 +396,6 @@ void GpuChannel::OnDestroyCommandBuffer(int32 route_id, OnScheduled(); DidDestroyCommandBuffer(gpu_preference); } -#endif if (reply_message) Send(reply_message); diff --git a/content/gpu/gpu_info_collector_linux.cc b/content/gpu/gpu_info_collector_linux.cc index 6608bb3..c3a6941 100644 --- a/content/gpu/gpu_info_collector_linux.cc +++ b/content/gpu/gpu_info_collector_linux.cc @@ -8,6 +8,7 @@ #include <vector> #include "base/command_line.h" +#include "base/debug/trace_event.h" #include "base/file_util.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" @@ -175,6 +176,8 @@ namespace gpu_info_collector { bool CollectGraphicsInfo(content::GPUInfo* gpu_info) { DCHECK(gpu_info); + TRACE_EVENT0("gpu", "gpu_info_collector::CollectGraphicsInfo"); + if (CommandLine::ForCurrentProcess()->HasSwitch( switches::kGpuNoContextLost)) { gpu_info->can_lose_context = false; diff --git a/content/gpu/gpu_info_collector_mac.mm b/content/gpu/gpu_info_collector_mac.mm index 434dc15..4c31ed0 100644 --- a/content/gpu/gpu_info_collector_mac.mm +++ b/content/gpu/gpu_info_collector_mac.mm @@ -6,6 +6,7 @@ #include <vector> +#include "base/debug/trace_event.h" #include "base/logging.h" #include "base/mac/scoped_cftyperef.h" #include "base/memory/scoped_ptr.h" @@ -157,6 +158,8 @@ namespace gpu_info_collector { bool CollectGraphicsInfo(content::GPUInfo* gpu_info) { DCHECK(gpu_info); + TRACE_EVENT0("gpu", "gpu_info_collector::CollectGraphicsInfo"); + gpu_info->can_lose_context = (gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2); gpu_info->finalized = true; diff --git a/content/gpu/gpu_info_collector_win.cc b/content/gpu/gpu_info_collector_win.cc index e37d0e9..6e28b51 100644 --- a/content/gpu/gpu_info_collector_win.cc +++ b/content/gpu/gpu_info_collector_win.cc @@ -9,6 +9,7 @@ #include <setupapi.h> #include "base/command_line.h" +#include "base/debug/trace_event.h" #include "base/file_path.h" #include "base/file_util.h" #include "base/logging.h" @@ -50,6 +51,8 @@ float ReadXMLFloatValue(XmlReader* reader) { } content::GpuPerformanceStats RetrieveGpuPerformanceStats() { + TRACE_EVENT0("gpu", "RetrieveGpuPerformanceStats"); + // If the user re-runs the assessment without restarting, the COM API // returns WINSAT_ASSESSMENT_STATE_NOT_AVAILABLE. Because of that and // http://crbug.com/124325, read the assessment result files directly. @@ -151,6 +154,8 @@ content::GpuPerformanceStats RetrieveGpuPerformanceStats() { namespace gpu_info_collector { bool CollectGraphicsInfo(content::GPUInfo* gpu_info) { + TRACE_EVENT0("gpu", "CollectGraphicsInfo"); + DCHECK(gpu_info); content::GpuPerformanceStats stats = RetrieveGpuPerformanceStats(); @@ -204,6 +209,8 @@ bool CollectGraphicsInfo(content::GPUInfo* gpu_info) { } bool CollectPreliminaryGraphicsInfo(content::GPUInfo* gpu_info) { + TRACE_EVENT0("gpu", "CollectPreliminaryGraphicsInfo"); + DCHECK(gpu_info); bool rt = true; @@ -216,6 +223,8 @@ bool CollectPreliminaryGraphicsInfo(content::GPUInfo* gpu_info) { } bool CollectGraphicsInfoD3D(IDirect3D9* d3d, content::GPUInfo* gpu_info) { + TRACE_EVENT0("gpu", "CollectGraphicsInfoD3D"); + DCHECK(d3d); DCHECK(gpu_info); @@ -246,6 +255,8 @@ bool CollectGraphicsInfoD3D(IDirect3D9* d3d, content::GPUInfo* gpu_info) { } bool CollectVideoCardInfo(content::GPUInfo* gpu_info) { + TRACE_EVENT0("gpu", "CollectVideoCardInfo"); + DCHECK(gpu_info); // nvd3d9wrap.dll is loaded into all processes when Optimus is enabled. @@ -280,6 +291,8 @@ bool CollectVideoCardInfo(content::GPUInfo* gpu_info) { bool CollectDriverInfoD3D(const std::wstring& device_id, content::GPUInfo* gpu_info) { + TRACE_EVENT0("gpu", "CollectDriverInfoD3D"); + // create device info for the display device HDEVINFO device_info = SetupDiGetClassDevsW( NULL, device_id.c_str(), NULL, @@ -353,6 +366,8 @@ bool CollectDriverInfoD3D(const std::wstring& device_id, } bool CollectDriverInfoGL(content::GPUInfo* gpu_info) { + TRACE_EVENT0("gpu", "CollectDriverInfoGL"); + DCHECK(gpu_info); std::string gl_version_string = gpu_info->gl_version_string; diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc index f2bf4ad..eee06ac 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc @@ -8,6 +8,7 @@ #include <windows.h> #endif +#include "base/debug/trace_event.h" #include "base/environment.h" #include "base/message_loop.h" #include "base/rand_util.h" @@ -42,6 +43,8 @@ // Main function for starting the Gpu process. int GpuMain(const content::MainFunctionParams& parameters) { + TRACE_EVENT0("gpu", "GpuMain"); + base::Time start_time = base::Time::Now(); const CommandLine& command_line = parameters.command_line; @@ -118,36 +121,57 @@ int GpuMain(const content::MainFunctionParams& parameters) { dead_on_arrival = true; } - // Warm up the random subsystem, which needs to be done pre-sandbox on all - // platforms. - (void) base::RandUint64(); - - // Warm up the crypto subsystem, which needs to done pre-sandbox on all - // platforms. - crypto::HMAC hmac(crypto::HMAC::SHA256); - unsigned char key = '\0'; - bool ret = hmac.Init(&key, sizeof(key)); - (void) ret; + { + TRACE_EVENT0("gpu", "Warm up rand"); + // Warm up the random subsystem, which needs to be done pre-sandbox on all + // platforms. + (void) base::RandUint64(); + } + { + TRACE_EVENT0("gpu", "Warm up HMAC"); + // Warm up the crypto subsystem, which needs to done pre-sandbox on all + // platforms. + crypto::HMAC hmac(crypto::HMAC::SHA256); + unsigned char key = '\0'; + bool ret = hmac.Init(&key, sizeof(key)); + (void) ret; + } #if defined(OS_LINUX) && !defined(OS_CHROMEOS) - content::InitializeSandbox(); + { + TRACE_EVENT0("gpu", "Initialize sandbox"); + content::InitializeSandbox(); + } #endif - base::win::ScopedCOMInitializer com_initializer; + { + TRACE_EVENT0("gpu", "Initialize COM"); + base::win::ScopedCOMInitializer com_initializer; + } #if defined(OS_WIN) - // Preload this DLL because the sandbox prevents it from loading. - LoadLibrary(L"setupapi.dll"); - - sandbox::TargetServices* target_services = - parameters.sandbox_info->target_services; - // Initialize H/W video decoding stuff which fails in the sandbox. - DXVAVideoDecodeAccelerator::PreSandboxInitialization(); - // For windows, if the target_services interface is not zero, the process - // is sandboxed and we must call LowerToken() before rendering untrusted - // content. - if (target_services) - target_services->LowerToken(); + { + TRACE_EVENT0("gpu", "Preload setupapi.dll"); + // Preload this DLL because the sandbox prevents it from loading. + LoadLibrary(L"setupapi.dll"); + } + + { + TRACE_EVENT0("gpu", "Initialize DXVA"); + // Initialize H/W video decoding stuff which fails in the sandbox. + DXVAVideoDecodeAccelerator::PreSandboxInitialization(); + } + + { + TRACE_EVENT0("gpu", "Lower token"); + // For windows, if the target_services interface is not zero, the process + // is sandboxed and we must call LowerToken() before rendering untrusted + // content. + sandbox::TargetServices* target_services = + parameters.sandbox_info->target_services; + if (target_services) + target_services->LowerToken(); + } #endif MessageLoop::Type message_loop_type = MessageLoop::TYPE_UI; @@ -176,7 +200,10 @@ int GpuMain(const content::MainFunctionParams& parameters) { gpu_process.set_main_thread(child_thread); - main_message_loop.Run(); + { + TRACE_EVENT0("gpu", "Run Message Loop"); + main_message_loop.Run(); + } child_thread->StopWatchdog(); diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index 3df9f77..f7125d7 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -766,6 +766,11 @@ scoped_ptr<base::SharedMemory> RenderThreadImpl::AllocateSharedMemory( int32 RenderThreadImpl::CreateViewCommandBuffer( int32 surface_id, const GPUCreateCommandBufferConfig& init_params) { + TRACE_EVENT1("gpu", + "RenderThreadImpl::CreateViewCommandBuffer", + "surface_id", + surface_id); + int32 route_id = MSG_ROUTING_NONE; IPC::Message* message = new GpuHostMsg_CreateViewCommandBuffer( surface_id, @@ -884,6 +889,8 @@ void RenderThreadImpl::OnCreateNewView(const ViewMsg_New_Params& params) { GpuChannelHost* RenderThreadImpl::EstablishGpuChannelSync( content::CauseForGpuLaunch cause_for_gpu_launch) { + TRACE_EVENT0("gpu", "RenderThreadImpl::EstablishGpuChannelSync"); + if (gpu_channel_.get()) { // Do nothing if we already have a GPU channel or are already // establishing one. diff --git a/ui/gl/gl_surface.cc b/ui/gl/gl_surface.cc index b5b2fd7..e7efc12 100644 --- a/ui/gl/gl_surface.cc +++ b/ui/gl/gl_surface.cc @@ -8,6 +8,7 @@ #include <vector> #include "base/command_line.h" +#include "base/debug/trace_event.h" #include "base/lazy_instance.h" #include "base/logging.h" #include "base/threading/thread_local.h" @@ -27,6 +28,8 @@ bool GLSurface::InitializeOneOff() { if (initialized) return true; + TRACE_EVENT0("gpu", "GLSurface::InitializeOneOff"); + std::vector<GLImplementation> allowed_impls; GetAllowedGLImplementations(&allowed_impls); DCHECK(!allowed_impls.empty()); diff --git a/ui/surface/accelerated_surface_win.cc b/ui/surface/accelerated_surface_win.cc index 4f2bb0e..362c0d1 100644 --- a/ui/surface/accelerated_surface_win.cc +++ b/ui/surface/accelerated_surface_win.cc @@ -161,13 +161,13 @@ void PresentThread::InitDevice() { if (device_) return; - TRACE_EVENT0("surface", "PresentThread::Init"); + TRACE_EVENT0("gpu", "PresentThread::Init"); d3d_module_.Reset(base::LoadNativeLibrary(FilePath(kD3D9ModuleName), NULL)); ResetDevice(); } void PresentThread::ResetDevice() { - TRACE_EVENT0("surface", "PresentThread::ResetDevice"); + TRACE_EVENT0("gpu", "PresentThread::ResetDevice"); // This will crash some Intel drivers but we can't render anything without // reseting the device, which would be disappointing. @@ -312,7 +312,7 @@ void AcceleratedPresenter::AsyncPresentAndAcknowledge( } bool AcceleratedPresenter::Present() { - TRACE_EVENT0("surface", "Present"); + TRACE_EVENT0("gpu", "Present"); bool result; @@ -335,7 +335,7 @@ void AcceleratedPresenter::DoPresent(bool* result) bool AcceleratedPresenter::DoRealPresent() { - TRACE_EVENT0("surface", "DoRealPresent"); + TRACE_EVENT0("gpu", "DoRealPresent"); HRESULT hr; base::AutoLock locked(lock_); @@ -355,7 +355,7 @@ bool AcceleratedPresenter::DoRealPresent() }; { - TRACE_EVENT0("surface", "PresentEx"); + TRACE_EVENT0("gpu", "PresentEx"); hr = swap_chain_->Present(&rect, &rect, window_, @@ -509,7 +509,7 @@ void AcceleratedPresenter::DoPresentAndAcknowledge( int64 surface_handle, const base::Callback<void(bool)>& completion_task) { TRACE_EVENT1( - "surface", "DoPresentAndAcknowledge", "surface_handle", surface_handle); + "gpu", "DoPresentAndAcknowledge", "surface_handle", surface_handle); HRESULT hr; @@ -542,7 +542,7 @@ void AcceleratedPresenter::DoPresentAndAcknowledge( // Ensure the swap chain exists and is the same size (rounded up) as the // surface to be presented. if (!swap_chain_ || size_ != quantized_size) { - TRACE_EVENT0("surface", "CreateAdditionalSwapChain"); + TRACE_EVENT0("gpu", "CreateAdditionalSwapChain"); size_ = quantized_size; D3DPRESENT_PARAMETERS parameters = { 0 }; @@ -565,7 +565,7 @@ void AcceleratedPresenter::DoPresentAndAcknowledge( } if (!source_texture_.get()) { - TRACE_EVENT0("surface", "CreateTexture"); + TRACE_EVENT0("gpu", "CreateTexture"); HANDLE handle = reinterpret_cast<HANDLE>(surface_handle); hr = present_thread_->device()->CreateTexture(size.width(), size.height(), @@ -597,7 +597,7 @@ void AcceleratedPresenter::DoPresentAndAcknowledge( }; { - TRACE_EVENT0("surface", "StretchRect"); + TRACE_EVENT0("gpu", "StretchRect"); hr = present_thread_->device()->StretchRect(source_surface, &rect, dest_surface, @@ -627,7 +627,7 @@ void AcceleratedPresenter::DoPresentAndAcknowledge( // Wait for the StretchRect to complete before notifying the GPU process // that it is safe to write to its backing store again. { - TRACE_EVENT0("surface", "spin"); + TRACE_EVENT0("gpu", "spin"); do { hr = present_thread_->query()->GetData(NULL, 0, D3DGETDATA_FLUSH); @@ -641,7 +641,7 @@ void AcceleratedPresenter::DoPresentAndAcknowledge( base::PlatformThread::Sleep(swap_delay); { - TRACE_EVENT0("surface", "Present"); + TRACE_EVENT0("gpu", "Present"); hr = swap_chain_->Present(&rect, &rect, window_, NULL, 0); if (FAILED(hr) && FAILED(present_thread_->device()->CheckDeviceState(window_))) { |