Closed Bug 1948872 Opened 1 year ago Closed 1 year ago

Add GC telemetry tests and fix a few edge cases

Categories

(Core :: JavaScript: GC, task, P2)

task

Tracking

()

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

I wrote a patch to add a way to capture telemetry samples from the shell and added a test for some of the GC telemetry. This turned up a couple of minor edge cases where we got things wrong.

This removes the shell option to dump telemetry to a file and replaces it with
an API to capture telemetry from JS.

Adding GC telemetry tests turned up a few minor bugs:

  1. The full GC flag wasn't always cleared at the end of GC and so
    GC_IS_COMPARTMENTAL telemetry could be mis-reported. I don't think this applies
    to to the browser.

  2. Aborting a GC always caused another GC to run since it was treated the same
    as resetting a GC. The patch adds a separate IncrementalResult value to handle
    this.

  3. Aborting a GC in the prepare phase could also cause another GC to run
    because it didn't cancel the slice requested by the background task.

There's still some weirdness around GC_NON_INCREMENTAL telemetry where the GC
is reported as incremental if FinishGC() was called to finish it
non-incrementally but reported as non-incremental if it was reset. I've left
that in because I'm not sure of the best solution and I don't think it makes
much difference anyway.

Assignee: nobody → jcoppeard
Status: NEW → ASSIGNED
Blocks: GC.stability
Severity: -- → N/A
Priority: -- → P2
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cd26e1642129 Add an API to capture telemetry in the shell and fix GC edge cases r=sfink
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: