Commit 7c2acaf3 by Jamie Madill

Add timer histogram for egl::Initialize time.

This can help is track startup time regressions within ANGLE. BUG=436191 BUG=angleproject:944 Change-Id: I73cf2449661b909dced4ddc11957037ed5535fc0 Reviewed-on: https://chromium-review.googlesource.com/272613Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarBrandon Jones <bajones@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 3a1f3673
...@@ -23,8 +23,9 @@ ...@@ -23,8 +23,9 @@
#include "common/mathutil.h" #include "common/mathutil.h"
#include "common/platform.h" #include "common/platform.h"
#include "libANGLE/Context.h" #include "libANGLE/Context.h"
#include "libANGLE/Surface.h"
#include "libANGLE/Device.h" #include "libANGLE/Device.h"
#include "libANGLE/histogram_macros.h"
#include "libANGLE/Surface.h"
#include "libANGLE/renderer/DisplayImpl.h" #include "libANGLE/renderer/DisplayImpl.h"
#include "third_party/trace_event/trace_event.h" #include "third_party/trace_event/trace_event.h"
...@@ -231,6 +232,8 @@ void Display::setAttributes(rx::DisplayImpl *impl, const AttributeMap &attribMap ...@@ -231,6 +232,8 @@ void Display::setAttributes(rx::DisplayImpl *impl, const AttributeMap &attribMap
Error Display::initialize() Error Display::initialize()
{ {
double createDeviceBegin = ANGLEPlatformCurrent()->currentTime();
TRACE_EVENT0("gpu.angle", "egl::Display::initialize"); TRACE_EVENT0("gpu.angle", "egl::Display::initialize");
ASSERT(mImplementation != nullptr); ASSERT(mImplementation != nullptr);
...@@ -274,6 +277,11 @@ Error Display::initialize() ...@@ -274,6 +277,11 @@ Error Display::initialize()
} }
mInitialized = true; mInitialized = true;
double displayInitializeSec = ANGLEPlatformCurrent()->currentTime() - createDeviceBegin;
int displayInitializeMS = static_cast<int>(displayInitializeSec * 1000);
ANGLE_HISTOGRAM_TIMES("GPU.ANGLE.DisplayInitializeMS", displayInitializeMS);
return Error(EGL_SUCCESS); return Error(EGL_SUCCESS);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment