Last active
August 29, 2015 14:16
-
-
Save ksmyth/606d952587a2c4842e4e to your computer and use it in GitHub Desktop.
Node.js flamegraphs on Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install -y build-essential git-core linux-tools-common linux-base | |
git clone https://github.com/joyent/node.git | |
cd node | |
git checkout origin/v0.11.14-release | |
./configure && make && sudo make install | |
node --perf-basic-prof app.js | |
sudo sysctl kernel/kptr_restrict=0 | |
sudo bash | |
perf record -F 99 -p `pgrep -n node` -g -- sleep 30 | |
# OR perf record -F 99 -p `pgrep -o node` -g -- sleep 30 | |
perf script > out.nodestacks01 | |
[ -d FlameGraph ] || git clone --depth 1 http://github.com/brendangregg/FlameGraph | |
cd FlameGraph | |
./stackcollapse-perf.pl < ../out.nodestacks01 | ./flamegraph.pl > ../out.nodestacks01.svg | |
cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After line 2 add
cd node
Line 4 should be ./configure && make && sudo make install
After line 10:
apt-get -y install linux-tools-common linux-base
kernel specific
apt-get -y install linux-tools-3.13.0-46-generic