From c5de7fdef56e4e9aafd0b558f294e6e614c493c9 Mon Sep 17 00:00:00 2001 From: luwenpeng Date: Thu, 5 Aug 2021 09:43:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20run=5Fflamegrah.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FlameGraph/run_flamegrah.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/FlameGraph/run_flamegrah.sh b/FlameGraph/run_flamegrah.sh index 7ce4244..fbb51c5 100644 --- a/FlameGraph/run_flamegrah.sh +++ b/FlameGraph/run_flamegrah.sh @@ -28,6 +28,9 @@ done # 执行后在当前目录下会生成采样数据 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 printf "\e[32m Collect data on cpu $2\e[0m\n" perf record -e cpu-clock --call-graph dwarf -C $2 -- sleep 5