Closed Bug 1686219 Opened 4 months ago Closed 4 months ago

Investigate storing chunk metadata as a header at the start of the chunk

Categories

(Core :: JavaScript: GC, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(3 files)

Currently we store all pre-chunk data as a trailer at the end of the chunk. This means the offset to this data depends on the size of the chunk. If we store it at the start then it becomes a constant. There are a bunch of hardcoded offsets like this defined in HeapAPI.h. It should also be possible have the compiler generate these for us.

This clears or sets every bit, taking care not to set trailing unused bits at the end of storage.

Previouly this used SpiderMonkey's BitArray, but that's not public. BitSet performs the same function.

Depends on D101775

This moves the chunk metadata to the start of the chunk and defines the data structures in the public header. This simplifies accessing this data and removes the need for hardcoded offsets.

Requesting review from jandem for JIT updates.

Depends on D101776

Attachment #9197110 - Attachment description: Bug 1686219 - Add BitSet::Clear() method to clear (or set) every bit r?heycam → Bug 1686219 - Add BitSet::SetAll and ResetAll methods r?heycam
Attachment #9197113 - Attachment description: Bug 1686219 - Store chunk information at the start rather than the end of the chunk r?sfink,jandem → Bug 1686219 - Store chunk information at the start rather than the end of the chunk r?sfink
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cc7e6feeb95a
Add BitSet::SetAll and ResetAll methods r=heycam
https://hg.mozilla.org/integration/autoland/rev/496d47ff3fa1
Use mozilla::BitSet for the chunk decommit state r=sfink
https://hg.mozilla.org/integration/autoland/rev/43978ebfc7ac
Store chunk information at the start rather than the end of the chunk r=sfink
Regressions: 1687690
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.