Closed Bug 1194932 Opened 9 years ago Closed 9 years ago

Fix racy initialization of the gfx.features.compositor field

Categories

(Toolkit :: Telemetry, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox42 --- fixed
firefox43 --- fixed

People

(Reporter: dvander, Assigned: dvander)

Details

Attachments

(1 file, 2 obsolete files)

TelemetryEnvironment waits for an observer notification to update the current compositor type under system.gfx.features. However, if the compositor gets created before we add the observer, we never register the compositor type.

I'm hoping this is the reason behind so many sessions (~40%) reporting a "none" compositor type. I can reproduce it locally.
Attached patch fix (obsolete) — Splinter Review
This patch tries to grab gfx featues when setup() runs, and then only adds the compositor observer if a compositor hasn't been created yet.
Attachment #8648339 - Flags: review?(gfritzsche)
Attached patch fix (obsolete) — Splinter Review
correct patch
Attachment #8648339 - Attachment is obsolete: true
Attachment #8648339 - Flags: review?(gfritzsche)
Attachment #8648340 - Flags: review?(gfritzsche)
Comment on attachment 8648340 [details] [diff] [review]
fix

Review of attachment 8648340 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/components/telemetry/TelemetryEnvironment.jsm
@@ +818,5 @@
> +      // update the graphics features object again.
> +      let watch = {
> +        observe: (aSubject, aTopic, aData) => {
> +          this._updateGraphicsFeatures();
> +          Services.obs.removeObserver(watch, COMPOSITOR_CREATED_TOPIC);

What about unregistering it on shutdown?
I think we should still unregister this in _removeObservers.
Attachment #8648340 - Flags: review?(gfritzsche)
Attached patch v2Splinter Review
Okay, simpler patch then.
Attachment #8648340 - Attachment is obsolete: true
Attachment #8649704 - Flags: review?(gfritzsche)
Attachment #8649704 - Flags: review?(gfritzsche) → review+
https://hg.mozilla.org/mozilla-central/rev/c411087193c8
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Comment on attachment 8649704 [details] [diff] [review]
v2

Approval Request Comment
[Feature/regressing bug #]: Graphics telemetry
[User impact if declined]: None
[Describe test coverage new/current, TreeHerder]: Landed on Nightly
[Risks and why]: No risk. Aurora has new telemetry probes to give us very useful information on the graphics features that our users have enabled. Unfortunately, there was a bug in the probe that makes it misreport about 40% of the time. I'd like to uplift this fix so that we get more reliable data.
[String/UUID change made/needed]:
Attachment #8649704 - Flags: approval-mozilla-aurora?
Comment on attachment 8649704 [details] [diff] [review]
v2

Fix the important telemetry issue, taking it in 42.
Attachment #8649704 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: