31 lines
2.0 KiB
Bash
31 lines
2.0 KiB
Bash
|
#!/bin/bash
|
||
|
set -xeuo pipefail
|
||
|
|
||
|
_build() {
|
||
|
name=$1
|
||
|
shift
|
||
|
bazel build --color=no --curses=no "$@" //:zigzag-0
|
||
|
bazel shutdown
|
||
|
bazel --batch clean --color=no --curses=no
|
||
|
perf record --call-graph=dwarf -g -o "$HOME/$name.data" bazel --batch build --color=no --curses=no "$@" ...
|
||
|
}
|
||
|
|
||
|
_build zigcc-hermetic-j1 --jobs=1 --platforms=@zig_sdk//libc_aware/platform:linux_amd64_gnu.2.28 --config=hermetic-sandbox
|
||
|
_build zigcc-hermetic-j8 --jobs=8 --platforms=@zig_sdk//libc_aware/platform:linux_amd64_gnu.2.28 --config=hermetic-sandbox
|
||
|
_build llvm-hermetic-j1 --jobs=1 --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux --config=hermetic-sandbox
|
||
|
_build llvm-hermetic-j8 --jobs=8 --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux --config=hermetic-sandbox
|
||
|
_build llvm-sysroot-hermetic-j1 --jobs=1 --platforms=@zig_sdk//libc_aware/platform:linux_amd64_gnu.2.28 --config=hermetic-sandbox
|
||
|
_build llvm-sysroot-hermetic-j8 --jobs=8 --platforms=@zig_sdk//libc_aware/platform:linux_amd64_gnu.2.28 --config=hermetic-sandbox
|
||
|
|
||
|
_build zigcc-j1 --jobs=1 --platforms=@zig_sdk//libc_aware/platform:linux_amd64_gnu.2.28
|
||
|
_build zigcc-j8 --jobs=8 --platforms=@zig_sdk//libc_aware/platform:linux_amd64_gnu.2.28
|
||
|
_build llvm-j1 --jobs=1 --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux
|
||
|
_build llvm-j8 --jobs=8 --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux
|
||
|
_build llvm-sysroot-j1 --jobs=1 --platforms=@zig_sdk//libc_aware/platform:linux_amd64_gnu.2.28
|
||
|
_build llvm-sysroot-j8 --jobs=8 --platforms=@zig_sdk//libc_aware/platform:linux_amd64_gnu.2.28
|
||
|
|
||
|
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
|