Closed Bug 1656331 Opened 4 years ago Closed 4 years ago

Add profiler markers that indicate why the refresh driver is firing

Categories

(Core :: Web Painting, task)

task

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

Attachments

(3 files)

(similar to bug 1494838)

Sometimes it's very hard to figure out from a profile why we were running the refresh driver. In a given refresh tick, if there are styles or reflow markers, often the refresh driver was triggered due to a restyle or a reflow, and we can find out what caused that restyle / reflow from those markers because we capture cause callstacks for restyles and reflows. But sometimes, refresh ticks are caused by something else, for example by an animated image. In that case we don't capture any cause. We should.

Here's an example of an animated image: https://storage.googleapis.com/gweb-uniblog-publish-prod/original_images/Social_dino-with-hat.gif
And here's a profile from that image page: http://bit.ly/2OUojxz

Profile with new marker info: https://share.firefox.dev/2P7QpqL

We can have markers with empty cause stacks, if we keep the timer running
without calling EnsureTimerStarted() again.

Depends on D85456

Attachment #9167121 - Attachment description: Bug 1656331 - Factor out nsRefreshDriver::HasReasonToTick() and ShouldKeepTimerRunningForInitialPaint(). r=smaug → Bug 1656331 - Factor out nsRefreshDriver::HasReasonToTick() and ShouldKeepTimerRunningWhileWaitingForFirstContentfulPaint(). r=smaug
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/44d7e24c0309
Factor out nsRefreshDriver::HasReasonToTick() and ShouldKeepTimerRunningWhileWaitingForFirstContentfulPaint(). r=smaug
https://hg.mozilla.org/integration/autoland/rev/ac09014802f0
Capture a cause callstack in EnsureTimerStarted() and insert the RefreshDriverTick marker in a different place. r=smaug
https://hg.mozilla.org/integration/autoland/rev/03201f4442c2
Create a TickReasons bitfield and add the tick reasons to the RefreshDriverTick profiler marker. r=smaug
Depends on: 1723181
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: