From 7d942e4fd6b20c9f66e36b2b4977c6371498ae94 Mon Sep 17 00:00:00 2001 From: tom doron Date: Tue, 12 May 2020 14:30:16 -0700 Subject: [PATCH] small fixes to the perf script motivation: keep script up to date changes: * use 5.3 nightly * better support for perf symlink as the location is a moving target * info about cold/warm start --- scripts/linux_performance_setup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/linux_performance_setup.sh b/scripts/linux_performance_setup.sh index 359feee0..7c11cbbd 100755 --- a/scripts/linux_performance_setup.sh +++ b/scripts/linux_performance_setup.sh @@ -13,7 +13,7 @@ ## ##===----------------------------------------------------------------------===## -# docker run --privileged -it -v `pwd`:/code -w /code swiftlang/swift:nightly-5.2-bionic bash +# docker run --privileged -it -v `pwd`:/code -w /code swiftlang/swift:nightly-5.3-bionic bash apt-get update -y apt-get install -y vim htop strace linux-tools-common linux-tools-generic libc6-dbg @@ -22,7 +22,7 @@ echo 0 > /proc/sys/kernel/kptr_restrict cd /usr/bin rm -rf perf -ln -s /usr/lib/linux-tools/4.15.0-91-generic/perf perf +ln -s /usr/lib/linux-tools/*/perf perf cd - cd /opt @@ -36,11 +36,11 @@ cd - # (.build/release/MockServer) & # # strace -# export MAX_REQUESTS=10000 +# export MAX_REQUESTS=10000 (or MAX_REQUESTS=1 for cold start analysis) # strace -o .build/strace-c-string-$MAX_REQUESTS -c .build/release/StringSample # strace -o .build/strace-ffftt-string-$MAX_REQUESTS -fftt .build/release/StringSample # # perf -# export MAX_REQUESTS=10000 +# export MAX_REQUESTS=10000 (or MAX_REQUESTS=1 for cold start analysis) # perf record -o .build/perf-$MAX_REQUESTS.data -g -F 100000 .build/release/StringSample dwarf # perf script -i .build/perf-$MAX_REQUESTS.data | /opt/FlameGraph/stackcollapse-perf.pl | swift-demangle | /opt/FlameGraph/flamegraph.pl > .build/flamegraph-$MAX_REQUESTS.svg