From 930bbf4d79e3a93f4fdbbe261c063357bd698b80 Mon Sep 17 00:00:00 2001 From: jmadill Date: Fri, 31 Jul 2015 11:31:33 -0700 Subject: [PATCH] gpu: Add a timer histogram for DoLinkProgram. We currently spend some time here on GPU process startup. I'm looking at reducing this time, so having a metric to measure the status quo could be very helpful. BUG=510151 TEST=bots Review URL: https://codereview.chromium.org/1269923002 Cr-Commit-Position: refs/heads/master@{#341373} --- gpu/command_buffer/service/gles2_cmd_decoder.cc | 2 ++ tools/metrics/histograms/histograms.xml | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 17ca003ea4e8..567d64afa168 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -18,6 +18,7 @@ #include "base/logging.h" #include "base/memory/linked_ptr.h" #include "base/memory/scoped_ptr.h" +#include "base/metrics/histogram_macros.h" #include "base/numerics/safe_math.h" #include "base/strings/string_number_conversions.h" #include "base/trace_event/trace_event.h" @@ -6310,6 +6311,7 @@ void GLES2DecoderImpl::DoRenderbufferStorage( void GLES2DecoderImpl::DoLinkProgram(GLuint program_id) { TRACE_EVENT0("gpu", "GLES2DecoderImpl::DoLinkProgram"); + SCOPED_UMA_HISTOGRAM_TIMER("GPU.DoLinkProgramTime"); Program* program = GetProgramInfoNotShader( program_id, "glLinkProgram"); if (!program) { diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index e3f00f067fdd..513275735f99 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml @@ -13036,6 +13036,14 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. + + jmadill@chromium.org + + The time we spend in GLES2DecoderImpl::DoLinkProgram. Related to how much + time we spend compiling shaders during startup. + + + reveman@chromium.org -- 2.11.4.GIT