Closed
Bug 786146
Opened 13 years ago
Closed 13 years ago
IonMonkey: eagerly generate stubs/wrappers, store in runtime
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: bhackett1024, Unassigned)
References
Details
(Whiteboard: [ion:t])
Attachments
(1 file)
|
106.83 KB,
patch
|
dvander
:
review+
nbp
:
feedback+
|
Details | Diff | Splinter Review |
The main difficulty with bug 785762 is the need to get IonCode objects for various stubs (VM function wrappers, etc.) that are lazily generated and need to be constructed on the main thread. It would be much simpler for off thread compilation if these objects were eagerly generated and guaranteed present during code generation, so that the compilation thread does not have to try to allocate any IonCode objects nor defer a linking step to later.
The attached patch eagerly generates all stubs/wrappers which were formerly lazily generated. On my machine this takes about .2ms and generates about 16KB of code (plus the IonCode objects themselves). This is a little steep when done per compartment, so this patch also moves this data into a new IonRuntime. The stubs are allocated in the atoms compartment and, once created, are not collected until the runtime is destroyed.
Attachment #655857 -
Flags: review?(dvander)
Comment 1•13 years ago
|
||
Comment on attachment 655857 [details] [diff] [review]
patch (01854460aa68)
Review of attachment 655857 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/ion/Ion.cpp
@@ +142,2 @@
> {
> + SwitchToCompartment sc(cx, cx->runtime->atomsCompartment);
I agree with the final goal, but either this compartment should be renamed or these executable pieces of code should be allocated in their own compartment.
Attachment #655857 -
Flags: feedback+
Updated•13 years ago
|
Whiteboard: [ion:t]
Updated•13 years ago
|
Attachment #655857 -
Flags: review?(dvander) → review+
| Reporter | ||
Comment 2•13 years ago
|
||
Pushed, with a couple tweaks to unbitrot off thread compilation.
https://hg.mozilla.org/integration/mozilla-inbound/rev/589b6766b99a
Comment 3•13 years ago
|
||
This blew up tests pretty bad. Backed out.
https://hg.mozilla.org/integration/mozilla-inbound/rev/f5e702c39521
See the TBPL push for logs of the bustage.
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=589b6766b99a
| Reporter | ||
Comment 4•13 years ago
|
||
Comment 5•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in
before you can comment on or make changes to this bug.
Description
•