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

Unified Diff: content/common/gpu/client/gpu_channel_host.cc

Issue 10386185: Add trace events to measure GPU process startup timing and time to first present. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/client/gpu_channel_host.cc
===================================================================
--- content/common/gpu/client/gpu_channel_host.cc (revision 137679)
+++ content/common/gpu/client/gpu_channel_host.cc (working copy)
@@ -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 @@
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 @@
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 @@
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();

Powered by Google App Engine
This is Rietveld 408576698