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

Issue 465223002: [ Do not submit ] Prototype for invalidation analysis

Created:
6 years, 4 months ago by pdr.
Modified:
6 years, 2 months ago
Reviewers:
caseq, kouhei (in TOK)
Project:
blink
Visibility:
Public.

Description

[ Do not submit ] Prototype for invalidation analysis This is a prototype for invalidation root-cause analysis in devtools using trace events. Our design doc is at: https://docs.google.com/document/d/1BXT3_gD--YdbIYMlTzNGsyUUMBCZJ7V5qGJhMA-pGrs/edit?usp=sharing This patch implements a simple prototype of style recalc invalidation reasons that lead to layout. A trace event has been added to Node::setNeedsStyleRecalc which is passed through devtools to the devtools timeline and is listed on the layout event. Screenshot: http://pr.gg/invalidations4.png

Patch Set 1 #

Patch Set 2 : Cleanup #

Total comments: 2

Patch Set 3 : Update after a day of hacking #

Patch Set 4 : Update #

Patch Set 5 : Fix multiple paint bug, fix bug where nodes did not linkify properly, minor cleanups #

Total comments: 8

Patch Set 6 : Fix two bugs where the wrong node was being blamed #

Patch Set 7 : Switch to tracking paint invalidations instead of paints #

Patch Set 8 : Unify the three invalidation trace event categories #

Total comments: 1

Patch Set 9 : Rebase after the layout trace event landed #

Patch Set 10 : Rebase #

Patch Set 11 : Rebase, remove rendererIds #

Patch Set 12 : Switch to using setGeneratingNodeIds #

Patch Set 13 : Rebase, move invalidation information to its own tab #

Patch Set 14 : Integrate style recalc patch (in flight) and show style invalidation reasons. #

Patch Set 15 : Use a more general approach for tracking invalidations by type #

Patch Set 16 : Wire up layers invalidations #

Patch Set 17 : Add first test of style recalc #

Patch Set 18 : Rewrite InvalidationTracker so subframe invalidations work, prove it with a test #

Patch Set 19 : Remove extra trace event from RenderObject, add a new layout test, update the style recalc test. #

Patch Set 20 : Rebase after http://crrev.com/631573002 #

Patch Set 21 : Update for review: cleanup sloppy algorithms, update tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+596 lines, -11 lines) Patch
M LayoutTests/inspector/tracing/timeline-event-causes.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +4 lines, -4 lines 0 comments Download
A LayoutTests/inspector/tracing/timeline-layout-deleted-node-invalidations.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +98 lines, -0 lines 0 comments Download
A LayoutTests/inspector/tracing/timeline-layout-deleted-node-invalidations-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +8 lines, -0 lines 0 comments Download
A LayoutTests/inspector/tracing/timeline-layout-invalidations.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +93 lines, -0 lines 0 comments Download
A LayoutTests/inspector/tracing/timeline-layout-invalidations-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +8 lines, -0 lines 0 comments Download
A LayoutTests/inspector/tracing/timeline-style-recalc-invalidations.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +83 lines, -0 lines 0 comments Download
A LayoutTests/inspector/tracing/timeline-style-recalc-invalidations-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +8 lines, -0 lines 0 comments Download
M Source/devtools/front_end/main/Main.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M Source/devtools/front_end/timeline/TracingTimelineModel.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 6 chunks +135 lines, -1 line 0 comments Download
M Source/devtools/front_end/timeline/TracingTimelineUIUtils.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 6 chunks +158 lines, -6 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
pdr.
6 years, 4 months ago (2014-08-13 04:50:38 UTC) #1
pdr.
Didn't mean to send this to blink-reviews. This is only intended for Kouhei.
6 years, 4 months ago (2014-08-13 04:52:56 UTC) #2
kouhei (in TOK)
This is amazing. O_o https://codereview.chromium.org/465223002/diff/20001/Source/devtools/front_end/timeline/TracingTimelineModel.js File Source/devtools/front_end/timeline/TracingTimelineModel.js (right): https://codereview.chromium.org/465223002/diff/20001/Source/devtools/front_end/timeline/TracingTimelineModel.js#newcode502 Source/devtools/front_end/timeline/TracingTimelineModel.js:502: layoutInitator = this._lastRecalculateStylesEvent.initiator; This line ...
6 years, 4 months ago (2014-08-13 16:32:14 UTC) #3
pdr.
On 2014/08/13 16:32:14, kouhei wrote: > This is amazing. O_o > > https://codereview.chromium.org/465223002/diff/20001/Source/devtools/front_end/timeline/TracingTimelineModel.js > File ...
6 years, 4 months ago (2014-08-14 03:53:14 UTC) #4
kouhei (in TOK)
> https://codereview.chromium.org/465223002/diff/20001/Source/devtools/front_end/timeline/TracingTimelineModel.js#newcode509 > > Source/devtools/front_end/timeline/TracingTimelineModel.js:509: > > event.invalidations = this._invalidations[frameId] ? > > this._invalidations[frameId].join('<br>') : ...
6 years, 4 months ago (2014-08-15 02:20:17 UTC) #5
caseq
caseq@chromium.org changed reviewers: + caseq@chromium.org
6 years, 3 months ago (2014-08-26 12:19:08 UTC) #6
caseq
https://codereview.chromium.org/465223002/diff/80001/Source/core/dom/Node.cpp File Source/core/dom/Node.cpp (right): https://codereview.chromium.org/465223002/diff/80001/Source/core/dom/Node.cpp#newcode780 Source/core/dom/Node.cpp:780: TRACE_DISABLED_BY_DEFAULT("devtools.timeline.styleInvalidationTracking"), nit: I wonder if category needs to be ...
6 years, 3 months ago (2014-08-26 12:19:08 UTC) #7
kouhei (in TOK)
https://codereview.chromium.org/465223002/diff/140001/Source/core/inspector/InspectorTraceEvents.h File Source/core/inspector/InspectorTraceEvents.h (right): https://codereview.chromium.org/465223002/diff/140001/Source/core/inspector/InspectorTraceEvents.h#newcode38 Source/core/inspector/InspectorTraceEvents.h:38: class InspectorStyleInvalidationTrackingEvent { Can we rename this to InspectorStyleRecalcInvalidationTrackingEvent? ...
6 years, 3 months ago (2014-09-11 18:03:36 UTC) #8
pdr.
On 2014/09/11 18:03:36, kouhei wrote: > https://codereview.chromium.org/465223002/diff/140001/Source/core/inspector/InspectorTraceEvents.h > File Source/core/inspector/InspectorTraceEvents.h (right): > > https://codereview.chromium.org/465223002/diff/140001/Source/core/inspector/InspectorTraceEvents.h#newcode38 > ...
6 years, 3 months ago (2014-09-11 18:06:04 UTC) #9
kouhei (in TOK)
6 years, 3 months ago (2014-09-11 18:09:46 UTC) #10
On 2014/09/11 18:06:04, pdr wrote:
> On 2014/09/11 18:03:36, kouhei wrote:
> >
>
https://codereview.chromium.org/465223002/diff/140001/Source/core/inspector/I...
> > File Source/core/inspector/InspectorTraceEvents.h (right):
> > 
> >
>
https://codereview.chromium.org/465223002/diff/140001/Source/core/inspector/I...
> > Source/core/inspector/InspectorTraceEvents.h:38: class
> > InspectorStyleInvalidationTrackingEvent {
> > Can we rename this to InspectorStyleRecalcInvalidationTrackingEvent? I want
to
> > use this for StyleInvalidator invalidation (a invalidation flag which is
> queried
> > before StyleInvalidator::invaldiate). StyleInvalidator then sets
> > setNeedsStyleRecalc on those nodes.
> 
> Yeah, that sounds reasonable.
> 
> Do we need both InspectorStyleInvalidationTrackingEvent and
> InspectorStyleRecalcInvalidationTrackingEvent for cases when
setNeedsStyleRecalc
> isn't called through style invalidator, or do all style invalidations pass
> through the style invalidator?
We need both. Not all the "recalcStyle" invalidations pass through style
invalidator, like "webfont load complete".

Powered by Google App Engine
This is Rietveld 408576698