Add FlameGraph

This commit is contained in:
luwenpeng
2021-07-14 09:21:56 +08:00
commit 5b13adbf7e
2 changed files with 12 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,12 @@
#!/bin/bash
if [ ! -n "$1" ] ;then
echo "Please input pid !"
exit 0
fi
rm -rf perf.data out.perf-folded result.svg
perf record -F 99 -p $1 -g -- sleep 10
perf script | FlameGraph-master/stackcollapse-perf.pl > out.perf-folded
FlameGraph-master/flamegraph.pl out.perf-folded > result.svg