Skip to content

Instantly share code, notes, and snippets.

@krisselden
Last active September 27, 2016 11:25
Show Gist options
  • Save krisselden/a1b920c8174a786e1ba1c4d36dbd3eef to your computer and use it in GitHub Desktop.
Save krisselden/a1b920c8174a786e1ba1c4d36dbd3eef to your computer and use it in GitHub Desktop.
Trace IC

Usage

Run

./trace-ic.sh http://localhost:8080 > ic.log

Wait until your page renders and the log file appending settles down.

tail -f ic.log

Viewing the log

Download https://github.com/v8/v8/blob/master/tools/ic-explorer.html

Open it in a browser and then open your log file from above.

Install

chmod a+x trace-ic.sh
export CHROME_BIN=/Path/To/Chrome  # defaults to Canary
#!/usr/bin/env bash
# check for CHROME_BIN env or just default to Canary
cmd=${CHROME_BIN:-/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary}
if [ -z "$1" ]
then
echo "Usage: `basename $0` [url]"
exit 1
fi
"$cmd" --no-default-browser-check \
--ignore-certificate-errors \
--metrics-recording-only \
--no-sandbox \
--no-experiments \
--disable-component-extensions-with-background-pages \
--disable-background-networking \
--disable-extensions \
--disable-default-apps \
--noerrdialogs \
--js-flags="--trace-ic" "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment