33ulimit -Ss 12288
44
55ROOT=` pwd`
6- LLVM=$ROOT /llvm
6+ LLVM=$ROOT /llvm-project/llvm
77
88BUILDBOT_CLOBBER=" ${BUILDBOT_CLOBBER:- } "
99BUILDBOT_REVISION=" ${BUILDBOT_REVISION:- origin/ main} "
@@ -306,8 +306,10 @@ function build_stage2 {
306306 -DCMAKE_CXX_FLAGS=" ${sanitizer_cflags} " \
307307 -DCMAKE_EXE_LINKER_FLAGS=" ${sanitizer_ldflags} " \
308308 $LLVM && \
309- time ninja) || build_failure
310- md5sum ${build_dir} /bin/clang || true
309+ /usr/bin/time -o ${ROOT} /time.txt -- ninja ) || build_failure
310+ (md5sum ${build_dir} /bin/clang* > ${ROOT} /md5.txt) || true
311+
312+ upload_stats stage2
311313}
312314
313315function build_stage2_msan {
@@ -480,8 +482,10 @@ function build_stage3 {
480482 -DCMAKE_CXX_FLAGS=" ${sanitizer_cflags} " \
481483 -DLLVM_CCACHE_BUILD=OFF \
482484 $LLVM && \
483- time ninja) || build_failure
484- md5sum ${build_dir} /bin/clang* || true
485+ /usr/bin/time -o ${ROOT} /time.txt -- ninja ) || build_failure
486+ (md5sum ${build_dir} /bin/clang* > ${ROOT} /md5.txt) || true
487+
488+ upload_stats stage3
485489}
486490
487491function build_stage3_msan {
@@ -557,3 +561,13 @@ function build_exception() {
557561 exit 2
558562 fi
559563}
564+
565+ function upload_stats() {
566+ if [[ " ${BUILDBOT_BISECT_MODE:- } " != " 1" && -v BUILDBOT_BUILDERNAME ]] ; then
567+ lscpu > " ${ROOT} /cpu.txt"
568+ curl http://metadata.google.internal/computeMetadata/v1/instance/machine-type \
569+ -H Metadata-Flavor:Google > " ${ROOT} /machine-type.txt"
570+ gsutil cp " ${ROOT} /" {time,md5,cpu,machine-type}" .txt" " gs://sanitizer-buildbot-out/${BUILDBOT_BUILDERNAME} /${1} /${BUILDBOT_REVISION} /" || true
571+ fi
572+ cat " ${ROOT} /" {time,md5}" .txt"
573+ }
0 commit comments