I should add that these flags were mostly intended for development of v8 
itself, and it is not necessarily easy to correlate the generated code with 
your javascript source. The --print-ast option can help with this.

Paul



On Dec 8, 2010, at 9:43 PM, Paul Lind <[email protected]> wrote:

> Hi Yehuda -
> 
> The v8 shell has a lot of options for seeing the generated code. Build the 
> shell in debug mode:
> 
> scons mode=debug sample=shell -jNN
> 
> Then run your code with these options, as a start:
> 
> shell_g --debug-code --print-code xxx.js
> 
> Other useful opts are: --print-code-stubs --trace-codegen
> 
> You can see all available opts with shell_g --help
> 
> There are also a lot of code profiling options built in, which may be very 
> useful for you. 
> 
> v8 had major changes in the past day that will certainly affect performance, 
> you might way to pull the latest, if you are on ia32 arch.
> 
> Hope this helps,
> 
> Paul
> 
> 
> 
> On Dec 8, 2010, at 7:57 PM, Yehuda Katz <[email protected]> wrote:
> 
>> Are there flags in V8 that will print out information about the V8
>> optimization process. For instance, in Hotspot, I can ask Java to
>> print out debugging information when a method gets compiled (-XX:
>> +PrintCompilation +PrintAssembly +PrintInlining) to see what kinds of
>> optimizations are happening.
>> 
>> This can be used to find trouble spots in code, where Hotspot is
>> intentionally not optimizing something that you might expect to get
>> optimized. One example would be methods that are too large to get
>> compiled in Hotspot. Are there similar or equivalent mechanisms in v8.
>> I am interested in learning more about what optimizations are
>> performed on different kinds of code in more detail.
>> 
>> Thanks,
>> 
>> -- Yehuda Katz
>> -- SproutCore
>> -- Strobe, Inc.
>> 
>> -- 
>> v8-users mailing list
>> [email protected]
>> http://groups.google.com/group/v8-users
> 
> -- 
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to