2022-12-11 20:54:28 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -xeuo pipefail
|
|
|
|
|
|
|
|
_build() {
|
|
|
|
name=$1
|
|
|
|
shift
|
2022-12-12 18:04:27 +02:00
|
|
|
bazel build --color=no --curses=no "$@" //:zigzag-0
|
|
|
|
bazel clean --color=no --curses=no
|
2022-12-12 09:43:08 +02:00
|
|
|
bazel shutdown --color=no --curses=no
|
2022-12-12 18:04:27 +02:00
|
|
|
perf record --call-graph=dwarf -g -o "$HOME/$name.data" bazel --batch build --color=no --curses=no "$@" ...
|
2022-12-11 20:54:28 +02:00
|
|
|
}
|
|
|
|
|
2022-12-12 09:43:08 +02:00
|
|
|
_build zigcc-nosandbox --spawn_strategy=local --platforms=@zig_sdk//libc_aware/platform:linux_amd64_gnu.2.28
|
|
|
|
_build llvm-nosandbox --spawn_strategy=local --extra_toolchains=@llvm_toolchain_with_sysroot//:cc-toolchain-x86_64-linux
|
|
|
|
_build zigcc --platforms=@zig_sdk//libc_aware/platform:linux_amd64_gnu.2.28
|
|
|
|
_build llvm --extra_toolchains=@llvm_toolchain_with_sysroot//:cc-toolchain-x86_64-linux
|
|
|
|
_build zigcc-reuse-sandbox-dirs --experimental_reuse_sandbox_directories --platforms=@zig_sdk//libc_aware/platform:linux_amd64_gnu.2.28
|
|
|
|
_build llvm-reuse-sandbox-dirs --experimental_reuse_sandbox_directories --extra_toolchains=@llvm_toolchain_with_sysroot//:cc-toolchain-x86_64-linux
|
2022-12-11 20:54:28 +02:00
|
|
|
|
|
|
|
for d in $HOME/*.data; do
|
|
|
|
f=$(basename "$d")
|
|
|
|
echo "perf script -i $d | inferno-collapse-perf | inferno-flamegraph > results/${f%data}svg"
|
|
|
|
done | parallel -v --eta
|