Closed Bug 1547310 Opened 3 years ago Closed 3 years ago

Cap the number of SharedScriptData leaks logged

Categories

(Core :: JavaScript: GC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

Details

Attachments

(1 file)

The JS engine prints out a bunch of stuff at shutdown when we leak. Mostly they are capped, but for some reason they aren't for SharedScriptData, so you get a ton of leaks like this logged:

ERROR: GC found live SharedScriptData 113B0C10 with ref count 2 at shutdown

Here's an example: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=242588968&repo=mozilla-inbound&lineNumber=72288

The reason this isn't capped for SharedScriptData is that this logging is done in js::FreeScriptData(), instead of ArenaLists::checkEmptyArenaList(), and it just doesn't have the same logic there to limit the amount of spam.

I'd also like to reduce maxCells in ArenaLists::checkEmptyArenaList() from 20 to something like 5 to make this less spammy. There's a fair amount of it given all of the tracekinds.

Also, reduce the number logged for other tracekinds to 5.

I tested this by disabling shutdown collections.

Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0e93a381964b
Cap the number of SharedScriptData leaks logged. r=jonco
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.