Move the regexp and concat stubs from JitRealm to JitZone
Categories
(Core :: JavaScript Engine: JIT, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox118 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [sp3])
Attachments
(5 files)
These stubs are pretty large and it'd be nice if we didn't need to regenerate them for each realm.
I think the main blocker for this is the regexp-match stub because it uses a template object. We can probably change this to use the MacroAssembler object allocation code that doesn't need a template object if we load the shape from the global.
Updated•1 year ago
|
Assignee | ||
Comment 1•1 year ago
|
||
Another issue is the RegExpStatics*
we currently bake in. This would have to be loaded from the global.
Comment 2•1 year ago
|
||
I noticed while looking at bug 1846777 that the regexp-match stub always allocates a match result with 16 fixed elements, which is usually going to be overkill. While we're touching this code we could look into saving a little bit of memory there.
Assignee | ||
Comment 3•1 year ago
|
||
(In reply to Iain Ireland [:iain] from comment #2)
I noticed while looking at bug 1846777 that the regexp-match stub always allocates a match result with 16 fixed elements, which is usually going to be overkill. While we're touching this code we could look into saving a little bit of memory there.
That's a good point. If we rewrite this to use createArrayWithFixedElements
we can fix that pretty easily and that seems worth doing regardless. I filed bug 1847714.
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 4•1 year ago
|
||
This will let us share the code across realms.
Assignee | ||
Comment 5•1 year ago
|
||
The regexp stubs can be pretty large and this avoids re-generating them for each realm.
It also lets us remove JitRealm
in a later patch because it's now empty.
Depends on D185910
Assignee | ||
Comment 6•1 year ago
|
||
Depends on D185911
Assignee | ||
Comment 7•1 year ago
|
||
We've migrated all shared stubs to JitZone
or JitRuntime
.
Depends on D185912
Assignee | ||
Comment 8•1 year ago
|
||
In MacroAssembler::checkAllocatorState
we were checking if the realm has a
metadata hook, but that doesn't work if code is shared across realms.
This patch adds a counter to the zone so that we can check if any realm has a
metadata hook. We now also only check this for object allocations so that string
and bigint allocations can still use the fast path.
Depends on D185913
Updated•1 year ago
|
Comment 10•1 year ago
|
||
"PERF" key word?
Comment 11•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/74e34f523e79
https://hg.mozilla.org/mozilla-central/rev/46ea212278dc
https://hg.mozilla.org/mozilla-central/rev/189960592ce4
https://hg.mozilla.org/mozilla-central/rev/e9faa0ecf53d
https://hg.mozilla.org/mozilla-central/rev/6853f3c9048b
Description
•