Closed
Bug 1371457
Opened 7 years ago
Closed 7 years ago
Stylo: DevTools failures because "Styles" profiler markers for restyling aren't emitted
Categories
(Core :: CSS Parsing and Computation, enhancement, P2)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: jryans, Assigned: jryans)
References
Details
Attachments
(3 files)
Gecko emits "Styles" profiler markers[1] when restyles are happening. Stylo doesn't appear to do so thus far.
This causes failures in tests like:
* devtools/server/tests/browser/browser_markers-styles.js[2]
which expects the markers to exist and have a restyle hint.
[1]: http://searchfox.org/mozilla-central/search?q=%22Styles%22&case=true®exp=false&path=layout
[2]: https://treeherder.mozilla.org/logviewer.html#?job_id=105301401&repo=try&lineNumber=87046
Assignee | ||
Comment 1•7 years ago
|
||
:bholley, do you intend for Stylo to expose profiler markers during restyle like Gecko does? (I realize Stylo may have different associated data to report than Gecko's restyle hint, but let's first work out if we're going to report the markers at all.)
Flags: needinfo?(bobbyholley)
Assignee | ||
Comment 2•7 years ago
|
||
According to :mstange, the perf.html UI doesn't surface these markers currently, so perhaps we could live without them if we want to. (The old profiler in DevTools does still use them, but we could probably live with that disappearing for a time, if needed.)
Comment 3•7 years ago
|
||
Is this a dup of bug 1344668?
Assignee | ||
Comment 4•7 years ago
|
||
Ah thanks, I forgot about that! I guess I'll depend on that bug, and leave this for the test failure specifically, which we may decide to disable for stylo or something (if we don't emit the data).
Looks like :bholley was consulted in the other big, so clearing ni? here.
Depends on: 1344668
Flags: needinfo?(bobbyholley)
Assignee | ||
Updated•7 years ago
|
Summary: Stylo: "Styles" profiler markers for restyling aren't emitted → Stylo: DevTools failures because "Styles" profiler markers for restyling aren't emitted
Comment 5•7 years ago
|
||
Well, hang on. That bug is about attaching restyle hints to the profile markers, which is different than emitting the profile markers themselves. We should totally emit the markers, since we want the devtools timeline to remain useful. Can we just strip out the restyle from the API and emit the plain markers?
Flags: needinfo?(jryans)
Assignee | ||
Comment 6•7 years ago
|
||
(In reply to Bobby Holley (:bholley) (busy with Stylo) from comment #5)
> Well, hang on. That bug is about attaching restyle hints to the profile
> markers, which is different than emitting the profile markers themselves. We
> should totally emit the markers, since we want the devtools timeline to
> remain useful. Can we just strip out the restyle from the API and emit the
> plain markers?
Ah yes, I agree it would be good to at least emit the markers first, and then we can consider the associated data more deeply in bug 1344668.
This particular test _does_ also check for the hint (in addition to the marker), but it seems reasonable to make that conditional on Gecko mode (or remove it from the test) until we've worked what associated restyle data makes sense to expose for Stylo.
It looks like it should pretty straightforward to record the markers without the hints.
My code search in comment 0 was for the wrong type of marker. We'd want to sprinkle start and stop RestyleTimelineMarkers[1] without the hint data to accomplish this.
[1]: http://searchfox.org/mozilla-central/search?q=RestyleTimelineMarker&case=true®exp=false&path=
Flags: needinfo?(jryans)
Comment 7•7 years ago
|
||
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #6)
> (In reply to Bobby Holley (:bholley) (busy with Stylo) from comment #5)
> > Well, hang on. That bug is about attaching restyle hints to the profile
> > markers, which is different than emitting the profile markers themselves. We
> > should totally emit the markers, since we want the devtools timeline to
> > remain useful. Can we just strip out the restyle from the API and emit the
> > plain markers?
>
> Ah yes, I agree it would be good to at least emit the markers first, and
> then we can consider the associated data more deeply in bug 1344668.
>
> This particular test _does_ also check for the hint (in addition to the
> marker), but it seems reasonable to make that conditional on Gecko mode (or
> remove it from the test) until we've worked what associated restyle data
> makes sense to expose for Stylo.
I think we should just stop exposing restyle hints period, as discussed in the other bug.
> It looks like it should pretty straightforward to record the markers without
> the hints.
Yep, I think we basically just want to stick the markers in ServoStyleSet::PrepareAndTraverseSubtree and call it a day.
Updated•7 years ago
|
Assignee: nobody → jryans
Priority: -- → P2
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 10•7 years ago
|
||
mozreview-review |
Comment on attachment 8881915 [details]
Bug 1371457 - Change restyle marker data to animation state.
https://reviewboard.mozilla.org/r/152980/#review158142
Attachment #8881915 -
Flags: review?(bobbyholley) → review+
Assignee | ||
Comment 11•7 years ago
|
||
Comment 12•7 years ago
|
||
mozreview-review |
Comment on attachment 8881916 [details]
Bug 1371457 - Add restyle markers for Stylo.
https://reviewboard.mozilla.org/r/152982/#review158146
Per IRL discussion, let's add markers for the post-traversal too.
Attachment #8881916 -
Flags: review?(bobbyholley) → review-
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 16•7 years ago
|
||
Comment on attachment 8881915 [details]
Bug 1371457 - Change restyle marker data to animation state.
:bholley should re-review this patch, as it has changed quite a bit.
Attachment #8881915 -
Flags: review+ → review?(bobbyholley)
Assignee | ||
Comment 17•7 years ago
|
||
Comment 18•7 years ago
|
||
mozreview-review |
Comment on attachment 8881915 [details]
Bug 1371457 - Change restyle marker data to animation state.
https://reviewboard.mozilla.org/r/152980/#review158570
Attachment #8881915 -
Flags: review?(bobbyholley) → review+
Comment 19•7 years ago
|
||
mozreview-review |
Comment on attachment 8881916 [details]
Bug 1371457 - Add restyle markers for Stylo.
https://reviewboard.mozilla.org/r/152982/#review158582
Per discussion:
* RAII class
* Don't overlap the StyleDocument with ProcessPostTraversal
* Separate marker for change hint processing.
Attachment #8881916 -
Flags: review?(bobbyholley) → review-
Comment 20•7 years ago
|
||
mozreview-review |
Comment on attachment 8882238 [details]
Bug 1371457 - Update animation restyle tests.
https://reviewboard.mozilla.org/r/153332/#review158584
Really thanks for doing this animation thing!
::: dom/animation/test/chrome/test_restyles.html:136
(Diff revision 1)
> ok(animation.isRunningOnCompositor);
>
> div.animationDuration = '200s';
>
> var markers = await observeStyling(5);
> - is(markers.length, 0,
> + // SMIL restyles are triggered for this case, leading to a non-zero count.
As discussed, we have no idea the extra restyles is come from SMIL or not, so please drop the SMIL word and file a bug and leave the bug number here.
Attachment #8882238 -
Flags: review?(hikezoe) → review+
Assignee | ||
Comment 21•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8882238 [details]
Bug 1371457 - Update animation restyle tests.
https://reviewboard.mozilla.org/r/153332/#review158584
> As discussed, we have no idea the extra restyles is come from SMIL or not, so please drop the SMIL word and file a bug and leave the bug number here.
Looks like this actually passes on try (it fails locally due to a known macOS issue), so I'll revert this part.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 25•7 years ago
|
||
Comment 26•7 years ago
|
||
mozreview-review |
Comment on attachment 8881916 [details]
Bug 1371457 - Add restyle markers for Stylo.
https://reviewboard.mozilla.org/r/152982/#review158616
Attachment #8881916 -
Flags: review?(bobbyholley) → review+
Comment 27•7 years ago
|
||
mozreview-review |
Comment on attachment 8881915 [details]
Bug 1371457 - Change restyle marker data to animation state.
https://reviewboard.mozilla.org/r/152980/#review159566
It all looks reasonable to me.
Attachment #8881915 -
Flags: review?(gtatum) → review+
Comment 28•7 years ago
|
||
mozreview-review |
Comment on attachment 8881916 [details]
Bug 1371457 - Add restyle markers for Stylo.
https://reviewboard.mozilla.org/r/152982/#review159952
Works for me!
Attachment #8881916 -
Flags: review?(gtatum) → review+
Comment 29•7 years ago
|
||
Pushed by jryans@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/80679a3f2961
Change restyle marker data to animation state. r=bholley,gregtatum
https://hg.mozilla.org/integration/autoland/rev/4128cdabed05
Add restyle markers for Stylo. r=bholley,gregtatum
https://hg.mozilla.org/integration/autoland/rev/91c446afc7e2
Update animation restyle tests. r=hiro
Comment 30•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/80679a3f2961
https://hg.mozilla.org/mozilla-central/rev/4128cdabed05
https://hg.mozilla.org/mozilla-central/rev/91c446afc7e2
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•