Open Bug 1288177 Opened 8 years ago Updated 2 years ago

Telemetry for GC reasons for starting full GCs

Categories

(Core :: JavaScript: GC, defect, P5)

defect

Tracking

()

Tracking Status
firefox50 --- affected

People

(Reporter: mccr8, Unassigned)

References

(Blocks 2 open bugs)

Details

About half of our GCs are full right now. It would be nice to have telemetry for why full GCs in particular are triggered, so that we can prioritize particular GC triggers. We have GC_REASON_2, but this is recording the reason for all slices of GC, so it is dominated by INTER_SLICE_GC and REFRESH_FRAME, and does not differentiate between full and zonal GCs.
Note that the current full GC telemetry might include GCs that we'd consider to be "ok". All it does is check that the number of zones scheduled for a GC is equal to the number of zones. If you have a single tab open, then I think any content zone GC may register as a "full GC" because we always collect the system zone.
Blocks: 1376904
No longer blocks: 1285355
Bill has some stats about what is triggering a full GC, in bug 1376904, which presumably he got via some telemetry query. That addresses the problem in the last sentence in comment 0, but the GC reason is still not going to be very accurate for the reason we do a full GC. The reason we record for a GC is just whatever the reason is the first time we poke the GC. Maybe we should record a reason every time we hit the code that sets sNeedsFullGC to true? This may record multiple reasons for a single GC, but maybe that's okay.

There's also JS::PokeGC, which can end up causing us to do a full GC. I don't know how often that is a factor, but I don't think we record any telemetry on that right now.
Assignee: nobody → continuation
Blocks: 1351781
Assignee: continuation → nobody
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.