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:
about:flags
(FPS Counter)about:memory
about:gpu
about:tracing
(to create your own boxes use console.time)
console.time('my_tag');
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
Want to learn more?
Sign up to get a digest of my articles and interesting links via email every month.