Hi John,

> 2. Why does Vyacheslav suggest using --trace-hydrogen? Is that needed to
see the disassembly?

I suggest passing --trace-hydrogen because it is needed to see the HIR -
high-level intermediate representation (also known as hydrogen) - which is
much easier to read then raw assembly. (for example Slides 38 on show HIR,
not disassembly)

Also if you --trace-hydrogen you can use a tool of mine called IRHydra[1]
to inspect optimized code. It can show you source, HIR & disassembly all
together[2].

[1] http://mrale.ph/irhydra/2
[2] http://imgur.com/HbOOXEM


Vyacheslav Egorov

On Wed, Oct 8, 2014 at 5:56 PM, John Feminella <[email protected]> wrote:

> As an educational exercise, I'd like to inspect disassembled JS generated
> by JS, and compare both the optimized and unoptimized versions to see what
> changes and what doesn't.
>
> In Vyacheslav Egorov's JSConf 2012 excellent slides (
> http://s3.mrale.ph/jsconf2012.pdf) he recommends compiling V8 like so:
>
> =====
> make ia32.release objectprint=on \
>   disassembler=on
>
> out/ia32.release/d8 --print-opt-code \
>   --code-comments \
>   --trace-hydrogen \
>   test.js
> =====
>
> which will enable the disassembler for introspection by the curious.
>
> I'm having a little trouble understanding the current state of affairs,
> though:
>
> 0. Is this the best way of doing things? How do I generate the
> *unoptimized* JS versus the *optimized* JS for test.js in this example?
>
> 1. Are Hydrogen and Crankshaft still relevant? For example, my limited
> understanding is that TurboFan will be replacing Hydrogen:
> https://codereview.chromium.org/426233002
> Is there somewhere I can read about the relevance and lifecycle of
> different pieces like Hydrogen and Crankshaft and how they play a role in
> code generation/optimization?
>
> 2. Why does Vyacheslav suggest using --trace-hydrogen? Is that needed to
> see the disassembly?
>
> Thanks for your help!
>
> best,
> ~ jf
>
> --
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to