IonMonkey Landed

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

IonMonkey Landed

dvander
Hi All,

IonMonkey has now landed on mozilla-central (yay!). Largely this shouldn't affect anyone doing SpiderMonkey development, but in case it does, here are the big takeaway changes:

(0) Benchmarks (usually) get faster. Compiling the shell does not. Sorry :(

(1) By running the shell, the flags "--ion -m -n" are now implied by default. You can disable them respectively with "--no-ion", "--no-jm", and "--no-ti". Disabling TI disables IonMonkey.

In the browser, there is one new JS pref: "javascript.options.ion.content". We don't expose any other flags since they'd only exist to horribly break stuff.

(2) IonMonkey, unlike JM, does not use the interpreter stack to store local variables and frames. It uses the C stack. This means that cx->fp(), js_GetTopStackFrame(), etc, must not be used unless with great care. Even if you have a js::StackFrame, it is not okay to peek at it because it could be stale.

When in doubt, use the wonderful ScriptFrameIter class. It has abstractions for walking the stack and inspecting frames so you don't ever have to touch a js::StackFrame.

(3) Lastly, IonMonkey introduces new ways to get in and out of the JIT. Briefly, they are:

  (a) At function calls or loop edges, we may decide to run a script with IonMonkey. From C++, this goes through ion::Cannon.

  (b) A guard failure, type-inference invalidation, or GC can cause a "bailout". A bailout is when an Ion frame on the stack must be converted back into an interpreter frame. When this happens, interpreter frames are created for each JS frame in the Ion frame (there can be multiple because of inlining), and we resume running the function in the interpreter instead.

-David
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: IonMonkey Landed

Wes Garland
YAY!

Congratulations, Ionmonkey Hackers!!

Wes

On 11 September 2012 16:11, dvander <[hidden email]> wrote:

> Hi All,
>
> IonMonkey has now landed on mozilla-central (yay!). Largely this shouldn't affect anyone doing SpiderMonkey development, but in case it does, here are the big takeaway changes:
>
> (0) Benchmarks (usually) get faster. Compiling the shell does not. Sorry :(
>
> (1) By running the shell, the flags "--ion -m -n" are now implied by default. You can disable them respectively with "--no-ion", "--no-jm", and "--no-ti". Disabling TI disables IonMonkey.
>
> In the browser, there is one new JS pref: "javascript.options.ion.content". We don't expose any other flags since they'd only exist to horribly break stuff.
>
> (2) IonMonkey, unlike JM, does not use the interpreter stack to store local variables and frames. It uses the C stack. This means that cx->fp(), js_GetTopStackFrame(), etc, must not be used unless with great care. Even if you have a js::StackFrame, it is not okay to peek at it because it could be stale.
>
> When in doubt, use the wonderful ScriptFrameIter class. It has abstractions for walking the stack and inspecting frames so you don't ever have to touch a js::StackFrame.
>
> (3) Lastly, IonMonkey introduces new ways to get in and out of the JIT. Briefly, they are:
>
>   (a) At function calls or loop edges, we may decide to run a script with IonMonkey. From C++, this goes through ion::Cannon.
>
>   (b) A guard failure, type-inference invalidation, or GC can cause a "bailout". A bailout is when an Ion frame on the stack must be converted back into an interpreter frame. When this happens, interpreter frames are created for each JS frame in the Ion frame (there can be multiple because of inlining), and we resume running the function in the interpreter instead.
>
> -David
> _______________________________________________
> dev-tech-js-engine mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-js-engine



--
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: IonMonkey Landed

Anthony Catel-4
 

o/

On Tue, 11 Sep 2012 16:17:23 -0400, Wes Garland wrote:

>
YAY!
>
> Congratulations, Ionmonkey Hackers!!
>
> Wes
>
> On 11
September 2012 16:11, dvander wrote:
>
>> Hi All, IonMonkey has now
landed on mozilla-central (yay!). Largely this shouldn't affect anyone
doing SpiderMonkey development, but in case it does, here are the big
takeaway changes: (0) Benchmarks (usually) get faster. Compiling the
shell does not. Sorry :( (1) By running the shell, the flags "--ion -m
-n" are now implied by default. You can disable them respectively with
"--no-ion", "--no-jm", and "--no-ti". Disabling TI disables IonMonkey.
In the browser, there is one new JS pref:
"javascript.options.ion.content". We don't expose any other flags since
they'd only exist to horribly break stuff. (2) IonMonkey, unlike JM,
does not use the interpreter stack to store local variables and frames.
It uses the C stack. This means that cx->fp(), js_GetTopStackFrame(),
etc, must not be used unless with great care. Even if you have a
js::StackFrame, it is not okay to peek at it because it could be stale.
When in doubt, use the wonderful ScriptFrameIter class. It has
abstractions for walking the stack and inspecting frames so you don't
ever have to touch a js::StackFrame. (3) Lastly, IonMonkey introduces
new ways to get in and out of the JIT. Briefly, they are: (a) At
function calls or loop edges, we may decide to run a script with
IonMonkey. From C++, this goes through ion::Cannon. (b) A guard failure,
type-inference invalidation, or GC can cause a "bailout". A bailout is
when an Ion frame on the stack must be converted back into an
interpreter frame. When this happens, interpreter frames are created for
each JS frame in the Ion frame (there can be multiple because of
inlining), and we resume running the function in the interpreter
instead. -David _______________________________________________
dev-tech-js-engine mailing list [hidden email] [1]
https://lists.mozilla.org/listinfo/dev-tech-js-engine [2]

 


Links:
------
[1] mailto:[hidden email]
[2]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
[3]
mailto:[hidden email]
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: IonMonkey Landed

Dave Mandelin-2
In reply to this post by dvander
Congratulations to all the IonMonkey contributors! This is the most advanced compiler in SpiderMonkey yet, and it should be able to do even more over time.

Dave
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: IonMonkey Landed

Anthony Catel-4
In reply to this post by dvander
 

Hey David,

Congratz for the huge work !

If found a big perf
regression. I filled a bug along with a test case :
https://bugzilla.mozilla.org/show_bug.cgi?id=790628 

Thanks,

Anthony
Catel

On Tue, 11 Sep 2012 13:11:46 -0700 (PDT), dvander wrote:

> Hi
All,
>
> IonMonkey has now landed on mozilla-central (yay!). Largely
this shouldn't affect anyone doing SpiderMonkey development, but in case
it does, here are the big takeaway changes:
>
> (0) Benchmarks
(usually) get faster. Compiling the shell does not. Sorry :(
>
> (1) By
running the shell, the flags "--ion -m -n" are now implied by default.
You can disable them respectively with "--no-ion", "--no-jm", and
"--no-ti". Disabling TI disables IonMonkey.
>
> In the browser, there
is one new JS pref: "javascript.options.ion.content". We don't expose
any other flags since they'd only exist to horribly break stuff.
>
>
(2) IonMonkey, unlike JM, does not use the interpreter stack to store
local variables and frames. It uses the C stack. This means that
cx->fp(), js_GetTopStackFrame(), etc, must not be used unless with great
care. Even if you have a js::StackFrame, it is not okay to peek at it
because it could be stale.
>
> When in doubt, use the wonderful
ScriptFrameIter class. It has abstractions for walking the stack and
inspecting frames so you don't ever have to touch a js::StackFrame.
>
>
(3) Lastly, IonMonkey introduces new ways to get in and out of the JIT.
Briefly, they are:
>
> (a) At function calls or loop edges, we may
decide to run a script with IonMonkey. From C++, this goes through
ion::Cannon.
>
> (b) A guard failure, type-inference invalidation, or
GC can cause a "bailout". A bailout is when an Ion frame on the stack
must be converted back into an interpreter frame. When this happens,
interpreter frames are created for each JS frame in the Ion frame (there
can be multiple because of inlining), and we resume running the function
in the interpreter instead.
>
> -David
>
_______________________________________________
> dev-tech-js-engine
mailing list
> [hidden email] [1]
>
https://lists.mozilla.org/listinfo/dev-tech-js-engine [2]

 


Links:
------
[1] mailto:[hidden email]
[2]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: IonMonkey Landed

Nicolas B. Pierron
In reply to this post by dvander
Hi Anthony,

On 09/12/2012 07:38 AM, [hidden email] wrote:
> If found a big perf
> regression. I filled a bug along with a test case :
> https://bugzilla.mozilla.org/show_bug.cgi?id=790628

Thanks for registering to Bugzilla and creating a new issue for that.
Opening the bug with "IonMonkey:" in the title and filing it under "Core >
Javascript Engine" should be enough for us to find it.  I will look at it
and see if this is related to a known issue.

--
Nicolas B. Pierron
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine