From 2698cec2e5afaa6ee26f940806b26236cc67ffd2 Mon Sep 17 00:00:00 2001 From: Zentrik Date: Fri, 26 Jul 2024 18:41:16 +0100 Subject: [PATCH] Test BOLT integration --- utilities/build_julia.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/utilities/build_julia.sh b/utilities/build_julia.sh index 9fa1062f..8afe221c 100755 --- a/utilities/build_julia.sh +++ b/utilities/build_julia.sh @@ -46,7 +46,7 @@ if [[ ! -z "${USE_JULIA_PGO_LTO-}" ]]; then echo "--- Build Julia Stage 1 - with instrumentation" - cd contrib/pgo-lto + cd contrib/pgo-lto-bolt ${MAKE} "${MFLAGS[@]}" stage1 # Building stage1 collects profiling data which we use instead of collecting our own fi @@ -61,9 +61,24 @@ for FLAG in "${MFLAGS[@]}"; do done if [[ ! -z "${USE_JULIA_PGO_LTO-}" ]]; then - echo "--- Build Julia Stage 2 - optimised" + echo "--- Build Julia Stage 2 - PGO + LTO optimised" ${MAKE} "${MFLAGS[@]}" stage2 + echo "--- Copying original shared libraries" + ${MAKE} "${MFLAGS[@]}" copy_originals + + echo "--- Instrumenting with BOLT" + ${MAKE} "${MFLAGS[@]}" bolt_instrument + + echo "--- Finishing and Profiling Julia Stage 2" + ${MAKE} "${MFLAGS[@]}" finish_stage2 + + echo "--- Merging BOLT Profiles" + ${MAKE} "${MFLAGS[@]}" merge_data + + echo "--- Optimize Julia Stage 2 with BOLT" + ${MAKE} "${MFLAGS[@]}" bolt + cd ../.. else echo "--- Build Julia"