Closed Bug 1643170 Opened 5 years ago Closed 5 years ago

Add memory reporter for HelperThreads::helperContexts_

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

This is a list of JSContexts. It uses about 30,000 bytes of memory in an empty content process. We should have a memory reporter for them.

My patch hits a protected data assert. Maybe due to JSContext::SizeOfExcludingThis calling cycleDetectorVector() while the context isn't active.

For what it's worth, we could easily initialize this more lazily. Most helper thread tasks don't request a JSContext anymore.

We have parsing (will be fixed short-term-ish after Stencil) and some GC tasks. On the other hand, if we can remove this completely later this year maybe we should just wait for that.

Severity: -- → N/A
Priority: -- → P3

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

For what it's worth, we could easily initialize this more lazily. Most helper thread tasks don't request a JSContext anymore.

Thanks, that's an interesting idea. I filed bug 1643368 for it.

With the new regexp reporter, this is 41,600 bytes of memory in a nearly-empty content process.

JSContexts aren't stored inline, so having this helper is convenient.

This is 41600 bytes of unreported memory in each process.

Pushed by amccreight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/07fff448894b part 1 - Add JSContext::sizeOfIncludingThis. r=jandem https://hg.mozilla.org/integration/autoland/rev/57cbb3edaf8e part 2 - Report memory for HelperThreads::helperContexts_. r=jandem
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: