Closed Bug 1637667 Opened 4 years ago Closed 4 years ago

Fix GC gray marking and compacting telemetry

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(2 files)

The gray marking telemetry is currently only recorded in some specific phases, but GCMarker::markUntilBudgetExhausted can switch into gray marking whatever the initial phase. I suspect most of our time spent gray marking is not recorded in telemetry.

The compacting telemetry shows a lot of suspiciously low times. We should check that we found any zones to compact before reporting compacting times.

This adds a count of zones we decided to compact and skips reporting telemetry if there weren't any.

This makes GCMaker::markUntilBudgetExhaused switch into the appropriate stats phase when marking gray things. We have to pass a parameter to make this conditional because we don't do this type of report off main thread and this happens when we mark on a background thread during sweeping. I rearranged the code so that we don't ever encounter gray things in that case by doing the marking on the main thread in cases where we would have joined the background task immediately anyway. We still need to skip reporting for marking done by processMarkQueue() but that's a debugging feature so this doesn't matter.

I had to move the SWEEP_MARK_GRAY_WEAK phase under SWEEP_MARK_WEAK but that does make some sense.

Depends on D75269

Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8ef5cc980550
Don't report compacting telemetry if we didn't compact any zones r=sfink
https://hg.mozilla.org/integration/autoland/rev/5e5a36b8ce9e
Switch into gray marking stats phase when marking gray things r=sfink
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: