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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1864543002: Add UMA stats for time in paint+layout, compositing, paint invalidation and paint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 8 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: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index bc81e5d688e772c706d65338fc87237fc5c3ee69..1cbc5fa27c3eba7c660536a7e250f3ef4fdcca63 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -85,6 +85,7 @@
#include "core/style/ComputedStyle.h"
#include "core/svg/SVGDocumentExtensions.h"
#include "core/svg/SVGSVGElement.h"
+#include "platform/Histogram.h"
#include "platform/HostWindow.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/ScriptForbiddenScope.h"
@@ -2522,6 +2523,7 @@ void FrameView::updatePaintProperties()
void FrameView::synchronizedPaint()
{
TRACE_EVENT0("blink", "FrameView::synchronizedPaint");
+ SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Paint.UpdateTime");
ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalFrame()));
@@ -2609,6 +2611,12 @@ void FrameView::updateFrameTimingRequestsIfNeeded()
void FrameView::updateStyleAndLayoutIfNeededRecursive()
{
+ SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.StyleAndLayout.UpdateTime");
+ updateStyleAndLayoutIfNeededRecursiveInternal();
+}
+
+void FrameView::updateStyleAndLayoutIfNeededRecursiveInternal()
+{
if (shouldThrottleRendering())
return;
@@ -2652,7 +2660,7 @@ void FrameView::updateStyleAndLayoutIfNeededRecursive()
}
for (const auto& frameView : frameViews)
- frameView->updateStyleAndLayoutIfNeededRecursive();
+ frameView->updateStyleAndLayoutIfNeededRecursiveInternal();
RELEASE_ASSERT(!needsLayout());
@@ -2685,6 +2693,12 @@ void FrameView::updateStyleAndLayoutIfNeededRecursive()
void FrameView::invalidateTreeIfNeededRecursive()
{
+ SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.PaintInvalidation.UpdateTime");
+ invalidateTreeIfNeededRecursiveInternal();
+}
+
+void FrameView::invalidateTreeIfNeededRecursiveInternal()
+{
RELEASE_ASSERT(layoutView());
// We need to stop recursing here since a child frame view might not be throttled
@@ -2712,7 +2726,7 @@ void FrameView::invalidateTreeIfNeededRecursive()
// invalidation onto them here.
if (!childFrameView.layoutView())
continue;
- childFrameView.invalidateTreeIfNeededRecursive();
+ childFrameView.invalidateTreeIfNeededRecursiveInternal();
}
}

Powered by Google App Engine
This is Rietveld 408576698