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

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

Issue 1852633002: Add UMA stats for time in paint+layout, compositing, paint invalidation and paint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 bfe3fce336326a5a609eb5869dbf5e159675cc07..41bc7230088579ac3bd378ea5d8bd4732ee78337 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -86,6 +86,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"
@@ -2487,6 +2488,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()));
@@ -2574,6 +2576,12 @@ void FrameView::updateFrameTimingRequestsIfNeeded()
void FrameView::updateStyleAndLayoutIfNeededRecursive()
{
+ SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.StyleAndLayout.UpdateTime");
+ updateStyleAndLayoutIfNeededRecursiveInternal();
+}
+
+void FrameView::updateStyleAndLayoutIfNeededRecursiveInternal()
+{
if (shouldThrottleRendering())
return;
@@ -2617,7 +2625,7 @@ void FrameView::updateStyleAndLayoutIfNeededRecursive()
}
for (const auto& frameView : frameViews)
- frameView->updateStyleAndLayoutIfNeededRecursive();
+ frameView->updateStyleAndLayoutIfNeededRecursiveInternal();
RELEASE_ASSERT(!needsLayout());
@@ -2650,6 +2658,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
@@ -2677,7 +2691,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