Closed Bug 1978820 Opened 8 months ago Closed 8 months ago

GCREASONS values don't match GC reasons in metrics.yaml

Categories

(Core :: JavaScript: GC, task)

task

Tracking

()

RESOLVED FIXED
143 Branch
Tracking Status
firefox143 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

Value 12 is missing here so the list of GC reasons in xpconnect/metrics.yaml after that point are off by one. XPConnect has static assertions to check LAST_FIREFOX_REASON matches the number of reasons in metrics.yaml but these assertions need a +1 to be correct.

I noticed this while adding a new GC reason for bug 1977367.

The static assertions need a +1 because LAST_FIREFOX_REASON is the PREPARE_FOR_PAGELOAD
reason and Glean's e__Other__ value comes after that.
See https://searchfox.org/mozilla-central/source/__GENERATED__/toolkit/components/glean/JsXpconnectMetrics.h#409

I'm a bit worried that this means there is an off by one somewhere further along the chain though, because the labels in Glam look plausible with INTER_SLICE_GC being the most common reason.

(In reply to Jon Coppeard (:jonco) from comment #2)

I'm a bit worried that this means there is an off by one somewhere further along the chain though, because the labels in Glam look plausible with INTER_SLICE_GC being the most common reason.

That is surprising. I'll see if I can get more data from a local build.

(In reply to Jan de Mooij [:jandem] from comment #3)

(In reply to Jon Coppeard (:jonco) from comment #2)

I'm a bit worried that this means there is an off by one somewhere further along the chain though, because the labels in Glam look plausible with INTER_SLICE_GC being the most common reason.

That is surprising. I'll see if I can get more data from a local build.

The code converts the GCReason to a string using the JS GCReason definition. Jon and I think that maybe it all just works because of that.

Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: