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

Issue 654013003: Implement invalidation tracking in devtools (Closed)

Created:
6 years, 2 months ago by pdr.
Modified:
6 years, 2 months ago
CC:
aandrey+blink_chromium.org, apavlov+blink_chromium.org, blink-reviews, caseq+blink_chromium.org, devtools-reviews_chromium.org, eustas+blink_chromium.org, loislo+blink_chromium.org, lushnikov+blink_chromium.org, malch+blink_chromium.org, paulirish+reviews_chromium.org, pfeldman+blink_chromium.org, sergeyv+blink_chromium.org, vsevik+blink_chromium.org, yurys+blink_chromium.org
Project:
blink
Visibility:
Public.

Description

Implement invalidation tracking in devtools This patch adds the first bits of the invalidation tracking experiment. Our full design doc is at: https://docs.google.com/document/d/1BXT3_gD--YdbIYMlTzNGsyUUMBCZJ7V5qGJhMA-pGrs/edit This patch implements the invalidation tracking logic for paint events only. Layout, style recalc, and compositing updates will be instrumented in a followup. To keep this patch simple, only the basic invalidation information has been added. Additional style invalidation information (https://src.chromium.org/viewvc/blink?view=rev&revision=183643) will be plumbed through in a followup. Reviewers are encouraged to play with this patch. Steps for testing: 1) Go to about://flags and enable "Enable Developer Tools experiments." 2) Restart Chrome. 3) Start Chrome, open devtools, and click the sprocket. Select "Experiments" and enable "Timeline with full invalidation tracking". 4) Restart devtools (or open a new tab). 5) Open your favorite slow page (or try http://pr.gg/jscsslayout.html), open devtools, start the timeline with the "Causes" checkbox checked. 6) Click the Paint events in the timeline, notice invalidation data! A screenshot preview is available at: http://pr.gg/invalidations7.png BUG=410701 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=184041

Patch Set 1 #

Total comments: 45

Patch Set 2 : Update per reviewer comments #

Patch Set 3 : Minor cleanup of case statement #

Total comments: 16

Patch Set 4 : Address reviewer comments, update how stacks are handled #

Total comments: 8

Patch Set 5 : Update per reviewer comments #

Patch Set 6 : Fix test to force layout in the correct frame #

Patch Set 7 : Update test for landing #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+594 lines, -10 lines) Patch
M LayoutTests/inspector/tracing/timeline-enum-stability-expected.txt View 1 2 chunks +4 lines, -0 lines 0 comments Download
A LayoutTests/inspector/tracing/timeline-layout-deleted-node-invalidations.html View 1 2 3 4 5 6 1 chunk +101 lines, -0 lines 0 comments Download
A LayoutTests/inspector/tracing/timeline-layout-deleted-node-invalidations-expected.txt View 1 chunk +8 lines, -0 lines 0 comments Download
A LayoutTests/inspector/tracing/timeline-layout-invalidations.html View 1 2 3 4 5 1 chunk +94 lines, -0 lines 0 comments Download
A LayoutTests/inspector/tracing/timeline-layout-invalidations-expected.txt View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
A LayoutTests/inspector/tracing/timeline-style-recalc-invalidations.html View 1 2 3 1 chunk +87 lines, -0 lines 0 comments Download
A LayoutTests/inspector/tracing/timeline-style-recalc-invalidations-expected.txt View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
M Source/core/inspector/InspectorTraceEvents.cpp View 1 2 3 2 chunks +4 lines, -2 lines 1 comment Download
M Source/devtools/front_end/main/Main.js View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/devtools/front_end/timeline/TimelineUIUtils.js View 1 2 3 4 1 chunk +9 lines, -1 line 0 comments Download
M Source/devtools/front_end/timeline/TracingTimelineModel.js View 1 2 3 4 6 chunks +119 lines, -1 line 0 comments Download
M Source/devtools/front_end/timeline/TracingTimelineUIUtils.js View 1 2 3 4 5 chunks +143 lines, -6 lines 0 comments Download
M Source/platform/TracedValue.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/platform/TracedValue.cpp View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (8 generated)
pdr.
Caseq, Kouhei, would you be up for an initial review of this patch?
6 years, 2 months ago (2014-10-15 04:59:28 UTC) #2
kouhei (in TOK)
Exciting! https://codereview.chromium.org/654013003/diff/1/Source/devtools/front_end/timeline/TracingTimelineUIUtils.js File Source/devtools/front_end/timeline/TracingTimelineUIUtils.js (right): https://codereview.chromium.org/654013003/diff/1/Source/devtools/front_end/timeline/TracingTimelineUIUtils.js#newcode731 Source/devtools/front_end/timeline/TracingTimelineUIUtils.js:731: var styleInvalidations = []; We might want to ...
6 years, 2 months ago (2014-10-15 05:34:00 UTC) #3
caseq
https://codereview.chromium.org/654013003/diff/1/Source/devtools/front_end/timeline/TracingTimelineModel.js File Source/devtools/front_end/timeline/TracingTimelineModel.js (right): https://codereview.chromium.org/654013003/diff/1/Source/devtools/front_end/timeline/TracingTimelineModel.js#newcode148 Source/devtools/front_end/timeline/TracingTimelineModel.js:148: disabledByDefault("devtools.timeline.invalidationTracking")]); make the latter conditional on Runtime.experiments.isEnabled("timelineInvalidationTracking")? https://codereview.chromium.org/654013003/diff/1/Source/devtools/front_end/timeline/TracingTimelineModel.js#newcode605 Source/devtools/front_end/timeline/TracingTimelineModel.js:605: ...
6 years, 2 months ago (2014-10-15 16:24:54 UTC) #4
pdr.
Thanks for the reviews! PTAL https://codereview.chromium.org/654013003/diff/1/Source/devtools/front_end/timeline/TracingTimelineModel.js File Source/devtools/front_end/timeline/TracingTimelineModel.js (right): https://codereview.chromium.org/654013003/diff/1/Source/devtools/front_end/timeline/TracingTimelineModel.js#newcode148 Source/devtools/front_end/timeline/TracingTimelineModel.js:148: disabledByDefault("devtools.timeline.invalidationTracking")]); On 2014/10/15 at ...
6 years, 2 months ago (2014-10-16 07:46:48 UTC) #5
caseq
On 2014/10/15 at 16:24:53, caseq wrote: >> I wonder if we should make it a ...
6 years, 2 months ago (2014-10-16 17:08:01 UTC) #6
pdr.
https://codereview.chromium.org/654013003/diff/40001/LayoutTests/inspector/tracing/timeline-layout-deleted-node-invalidations.html File LayoutTests/inspector/tracing/timeline-layout-deleted-node-invalidations.html (right): https://codereview.chromium.org/654013003/diff/40001/LayoutTests/inspector/tracing/timeline-layout-deleted-node-invalidations.html#newcode11 LayoutTests/inspector/tracing/timeline-layout-deleted-node-invalidations.html:11: var element = document.getElementsByTagName('p')[0]; On 2014/10/16 at 17:08:00, caseq ...
6 years, 2 months ago (2014-10-17 05:07:04 UTC) #7
kouhei (in TOK)
lgtm from my side.
6 years, 2 months ago (2014-10-17 05:09:48 UTC) #8
pdr.
Thanks for the reviews! PTAL On 2014/10/16 at 17:08:01, caseq wrote: > In my view, ...
6 years, 2 months ago (2014-10-17 05:16:23 UTC) #10
yurys
On 2014/10/17 05:16:23, pdr wrote: > Thanks for the reviews! PTAL > > On 2014/10/16 ...
6 years, 2 months ago (2014-10-17 05:48:11 UTC) #11
caseq
lgtm https://codereview.chromium.org/654013003/diff/60001/Source/devtools/front_end/timeline/TracingTimelineModel.js File Source/devtools/front_end/timeline/TracingTimelineModel.js (right): https://codereview.chromium.org/654013003/diff/60001/Source/devtools/front_end/timeline/TracingTimelineModel.js#newcode1196 Source/devtools/front_end/timeline/TracingTimelineModel.js:1196: var effectivePaintId = this._lastPaintWithLayer.args.data.nodeId; args["data"]["nodeId"] https://codereview.chromium.org/654013003/diff/60001/Source/devtools/front_end/timeline/TracingTimelineUIUtils.js File Source/devtools/front_end/timeline/TracingTimelineUIUtils.js ...
6 years, 2 months ago (2014-10-17 15:48:55 UTC) #12
pdr.
Thank you all for the reviews! Off to teh CQ https://codereview.chromium.org/654013003/diff/60001/Source/devtools/front_end/timeline/TracingTimelineModel.js File Source/devtools/front_end/timeline/TracingTimelineModel.js (right): https://codereview.chromium.org/654013003/diff/60001/Source/devtools/front_end/timeline/TracingTimelineModel.js#newcode1196 ...
6 years, 2 months ago (2014-10-20 21:38:05 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/654013003/80001
6 years, 2 months ago (2014-10-20 21:38:57 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/30056)
6 years, 2 months ago (2014-10-20 22:40:14 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/654013003/100001
6 years, 2 months ago (2014-10-21 03:23:09 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/654013003/120001
6 years, 2 months ago (2014-10-21 04:17:14 UTC) #21
commit-bot: I haz the power
Committed patchset #7 (id:120001) as 184041
6 years, 2 months ago (2014-10-21 05:42:25 UTC) #22
yurys
This CL introduced lots of JS compiler errors.You can run it manually via Source/devtools/scripts/compile_frontend.py but ...
6 years, 2 months ago (2014-10-21 07:36:55 UTC) #24
yurys
I'll send a fix for the errors shortly.
6 years, 2 months ago (2014-10-21 07:39:56 UTC) #25
yurys
Fix landed as https://src.chromium.org/viewvc/blink?view=rev&revision=184050
6 years, 2 months ago (2014-10-21 07:52:09 UTC) #26
aandrey
https://codereview.chromium.org/654013003/diff/120001/Source/core/inspector/InspectorTraceEvents.cpp File Source/core/inspector/InspectorTraceEvents.cpp (right): https://codereview.chromium.org/654013003/diff/120001/Source/core/inspector/InspectorTraceEvents.cpp#newcode119 Source/core/inspector/InspectorTraceEvents.cpp:119: value->setArray("stackTrace", stackTrace->buildInspectorArray()->asArray()); FYI, stackTrace also contains async stack trace, ...
6 years, 2 months ago (2014-10-21 08:34:49 UTC) #28
yurys
6 years, 2 months ago (2014-10-21 09:01:35 UTC) #29
Message was sent while issue was closed.
Opened a new bug about running js compilation as presubmit check on Mac and Win:
crbug.com/425468

Powered by Google App Engine
This is Rietveld 408576698