From Console to Chrome

I'm trying to pick up with my watch later list on Youtube and today I watched From Console to Chrome by Lilli Thompson.

Some Chrome features to be aware of:

  1. console.time('my_tag');
  2. console.timeEnd('my_tag');

There are also command line switches to V8:

google-chrome --js-flags="  "

--trace-bailout - Chrome found function to optimize but it can't (see why)
--trace-opt - functions that were optimized.
--trace-deopt - when faster function is switched to slower one

google-chrome --js-flags="--trace-bailout --trace-opt --trace-deopt"

Searching for more about deopt I found that on my watch list is another video about it: http://www.youtube.com/watch?v=UJPdhx5zTaw

There is discussion how to really use them: Is --trace-deopt actually usable? If so, how are you supposed to use it?

Jakob Kummerow suggest to use also: --print-opt-code and --code-comments

Ranting about flags or their output being cryptic may help you let off some steam, but beyond that doesn't get you anywhere. V8's command-line flags let you peek at V8's inner workings, and making sense of their output requires some understanding of these internals. Nobody ever claimed anything else.

So this is mostly useful in debug builds of V8 and when you REALLY need to optimize Game.

Some low level articles, but I give them only as help:
Optimizing for V8 - Hydrogen
Optimizing for V8 - Inlining, Deoptimizations



Share on Hacker News
Share on LinkedIn


← Home


Want to learn more?

Sign up to get a digest of my articles and interesting links via email every month.

* indicates required

Please select all the ways you would like to hear from Krzysztof Kula:

You can unsubscribe at any time by clicking the link in the footer of my emails.

I use Mailchimp as a marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.