更新 run_flamegrah.sh

This commit is contained in:
luwenpeng
2021-08-05 09:43:22 +08:00
parent da15ff0d33
commit c5de7fdef5

View File

@@ -28,6 +28,9 @@ done
# 执行后在当前目录下会生成采样数据 perf.data # 执行后在当前目录下会生成采样数据 perf.data
rm -rf perf.data rm -rf perf.data
# perf record -e cpu-clock --call-graph dwarf -C $2 -- sleep 5
# perf record --call-graph lbr -C $2 -- sleep 5
if [ $opt_type == "c" ]; then if [ $opt_type == "c" ]; then
printf "\e[32m Collect data on cpu $2\e[0m\n" printf "\e[32m Collect data on cpu $2\e[0m\n"
perf record -e cpu-clock --call-graph dwarf -C $2 -- sleep 5 perf record -e cpu-clock --call-graph dwarf -C $2 -- sleep 5