Closed Bug 1704570 Opened 4 years ago Closed 4 years ago

Fix a few heap-unclassified issues in SpiderMonkey

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

In order to validate some of the sharing work in the Stencil project, we need to improve the accuracy of the memory report by fixing issues identified by DMD. I'll put up a grab-bag of patches here.

NOTE: This will move attribution from heap-unclassified to js-content so I expect a few alerts to trigger even though no behavior is changed.

This moves some memory accounting from heap-unclassified to being part of the
runtime-atoms accounting like commonNames.

The Zone::regExps_ field is a UniquePtr so we should use the including-this
variant of memory reporters for it. This was previously heap-unclassified.

Depends on D111752

This change converts some heap-unclassified memory to js-content. These show
up in DMD reports now that Set/Map are used in the browser itself.

As a side-effect, this adds more precise tracking to UBI system for tenured
objects. The nursery objects don't have the expected size but this is
pre-existing similar to typed objects. Due to this mismatch it is difficult
to write automated tests for this.

Also mark the Map / Set types as using delayed metadata notification so that
reserved slots can be fully initialized before debugger is notified. This
only delays things to a few function calls later.

Depends on D111753

I looked at DMD report for a basic ./mach run --dmd run for any js/ traces with more than 8k heap-unclassified. With these patches, the main remaining issues are:

  • Profiler markers stack
  • GC memory-tracker (debug only)
  • JitcodeGlobalTable
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3ae2a22127d2 Report WellKnownParserAtoms memory correctly. r=nbp https://hg.mozilla.org/integration/autoland/rev/ea37b330c609 Fix memory reporting for RegExpZone. r=nbp https://hg.mozilla.org/integration/autoland/rev/c0c760df165b Add memory reporting for MapObject / SetObject data. r=nbp
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: