Closed Bug 1922259 Opened 4 months ago Closed 4 months ago

CodeGeneratorShared::outOfLineCode_ should be a TempObject InlineForwardList.

Categories

(Core :: JavaScript Engine: JIT, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: nbp, Assigned: nbp)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

Attachments

(1 file)

This bug focus on the js::jit::OutOfLineCode* case reported in Bug 1922073.

OutOfLineCode vector is only appending new elements to be iterated over once, and it does not outlive the CodeGenerator.

We should convert the OutOfLineCodeBase to be a TempObject as well as an InlineForwardListNode. Converting the vector to an InlineForwardList should not have much impact on the performance of it, as at the time of the CodeGenerator our use of the LifoAlloc is quite limited / non-existent.

This change is here to help reduce the lock contention around the usage of the
system allocator.

Given that the OutOfLineCode are used only within the CodeGenerator, the vector
of OutOfLineCode will never need to escape past the compilation. Also the vector
is only used to append into and to iterate over it in the inserting order.

Thus, this patch replaces the Vector by a linked list which link all
OutOfLineCode allocations, allocated in the LifoAlloc, and make it possible to
iterate on it while we append to the list.

Pushed by npierron@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d0ce86b4695a Convert CodeGeneratorShared::outOfLineCode_ to a linked list. r=jandem
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
Whiteboard: [sp3]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: