Closed Bug 669969 Opened 13 years ago Closed 13 years ago

Make TypeObject a GC thing

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bhackett1024, Assigned: bhackett1024)

References

Details

Attachments

(1 file)

We need to check whether type objects are marked over and over during GC, regardless of how many type objects there actually are. TypeObjects are currently malloc'ed individually and store their mark bits as a field, which has the potential for lots of fragmentation and cache misses.
Attached patch patch (deleted) — Splinter Review
Make TypeObject a GC thing, and do some other refactoring: - Allow singleton type objects (representing exactly one JS object) to be destroyed on each GC (in addition to being lazily constructed, as last week's refactoring did) if the conservative GC does not find a pointer to them, and allocate their data from the analysis pool rather than via malloc. - Track per-allocation-site type objects in a per-compartment hashtable (similar to what we do for JSON/singleton type info). This cuts the size of TypeObject significantly, and removes a mostly-unused pointer from JSScript. Allocation of such objects may slow down, the fix for that is to inline creation of objects, arrays etc. in the jitcode. This also removes the quadratic behavior seen with scripts containing tons of object/array initializers. Another tests-pass push (at least in the shell), still need to see how this affects memory.
Assignee: general → bhackett1024
Blocks: 680951
Depends on: 684348
Can this be closed?
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: