Closed Bug 679329 Opened 14 years ago Closed 14 years ago

TI: allocate all typeset data and properties from arenas

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bhackett1024, Unassigned)

References

Details

(Keywords: memory-footprint)

Attachments

(1 file)

Right now the tables used in typesets containing multiple objects, type properties, and tables used in type objects containing multiple properties are allocated either from the compartment's transient pool or from malloc, depending on whether the data must survive GCs. It would be cleaner and faster to just always allocate from the transient arena, and on GC copy over everything that is still live to a new arena. This copying may have a marginal impact during GC, though I doubt it (the data needs to be traversed anyways, and there isn't much of it --- 3MB in a 150 tab run, per bug 678044). The primary purpose is to reduce any effect which TI has on browser heap fragmentation, as this will eliminate almost all malloc'ing done by TI.
Blocks: 678044
Attached patch patchSplinter Review
Patch, with the above and some other fixes: - Purge observed types from a compartment's scripts on each 1/8 lifetime for normal mjit code, provided that no frames from the compartment are on the stack. The 1/8 lifetime was reduced from 2min to 1min. - Report to about:memory for TI data that was previously missed: newScript data attached to type objects, per-compartment tables storing TI data and worklists for solving type constraints. These add up to a few MB in a 150 tab run; all TI data should now be accounted for. - Purge the constraint worklist on each GC, which could be 75K+ for complex compartments and is easy to regenerate if the compartment becomes active again. http://hg.mozilla.org/projects/jaegermonkey/rev/aa547ed80bba
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Keywords: footprint
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: