This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tsg-tsg-performance-test-tools/FlameGraph/run_flamegrap.sh
2021-07-14 09:21:56 +08:00

13 lines
292 B
Bash

#!/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