Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions contrib/bolt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ stage1: | $(STAGE1_BUILD)
copy_originals: stage1
for file in $(FILES_TO_OPTIMIZE); do \
abs_file=$(STAGE1_BUILD)/usr/lib/$$file; \
cp $$abs_file "$$abs_file.original"; \
cp -a $$abs_file "$$abs_file.original"; \
done && \
touch $@

Expand All @@ -83,10 +83,9 @@ copy_originals: stage1
bolt_instrument: copy_originals
for file in $(FILES_TO_OPTIMIZE); do \
abs_file=$(STAGE1_BUILD)/usr/lib/$$file; \
old_time=$$(stat -c %Y $$abs_file); \
$(LLVM_BOLT) "$$abs_file.original" -o $$abs_file --instrument --instrumentation-file-append-pid --instrumentation-file="$(PROFILE_DIR)/$$file-prof" -no-huge-pages; \
mkdir -p $$(dirname "$(PROFILE_DIR)/$$file-prof"); \
touch -d "@$$old_time" $$abs_file; \
touch -r "$$abs_file.original" $$abs_file; \
printf "\n"; \
done && \
touch $@
Expand All @@ -111,9 +110,8 @@ merge_data: bolt_instrument
bolt: merge_data
for file in $(FILES_TO_OPTIMIZE); do \
abs_file=$(STAGE1_BUILD)/usr/lib/$$file; \
old_time=$$(stat -c %Y $$abs_file); \
$(LLVM_BOLT) "$$abs_file.original" -data "$(PROFILE_DIR)/$$file-prof.merged.fdata" -o $$abs_file $(BOLT_ARGS) $$(if [ "$$file" != $(shell readlink $(STAGE1_BUILD)/usr/lib/libjulia-internal.so) ]; then echo "--use-old-text -split-strategy=cdsplit"; fi); \
touch -d "@$$old_time" $$abs_file; \
touch -r "$$abs_file.original" $$abs_file; \
done && \
touch $@

Expand Down
8 changes: 3 additions & 5 deletions contrib/pgo-lto-bolt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ stage2: $(PGO_PROFILE_FILE) | $(STAGE2_BUILD)
copy_originals: stage2
for file in $(FILES_TO_OPTIMIZE); do \
abs_file=$(STAGE2_BUILD)/usr/lib/$$file; \
cp $$abs_file "$$abs_file.original"; \
cp -a $$abs_file "$$abs_file.original"; \
done && \
touch $@

Expand All @@ -127,10 +127,9 @@ copy_originals: stage2
bolt_instrument: copy_originals
for file in $(FILES_TO_OPTIMIZE); do \
abs_file=$(STAGE2_BUILD)/usr/lib/$$file; \
old_time=$$(stat -c %Y $$abs_file); \
$(LLVM_BOLT) "$$abs_file.original" -o $$abs_file --instrument --instrumentation-file-append-pid --instrumentation-file="$(BOLT_PROFILE_DIR)/$$file-prof" -no-huge-pages; \
mkdir -p $$(dirname "$(BOLT_PROFILE_DIR)/$$file-prof"); \
touch -d "@$$old_time" $$abs_file; \
touch -r "$$abs_file.original" $$abs_file; \
printf "\n"; \
done && \
touch $@
Expand Down Expand Up @@ -158,9 +157,8 @@ merge_data: bolt_instrument
bolt: merge_data
for file in $(FILES_TO_OPTIMIZE); do \
abs_file=$(STAGE2_BUILD)/usr/lib/$$file; \
old_time=$$(stat -c %Y $$abs_file); \
$(LLVM_BOLT) "$$abs_file.original" -data "$(BOLT_PROFILE_DIR)/$$file-prof.merged.fdata" -o $$abs_file $(BOLT_ARGS) $$(if [ "$$file" != $(shell readlink $(STAGE2_BUILD)/usr/lib/libjulia-internal.so) ]; then echo "--use-old-text -split-strategy=cdsplit"; fi); \
touch -d "@$$old_time" $$abs_file; \
touch -r "$$abs_file.original" $$abs_file; \
done && \
touch $@

Expand Down