-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move PGO collection to the separate script
- Loading branch information
Showing
4 changed files
with
24 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
# ------------------------------------------------------------------------ | ||
# Build version which collects PGO data | ||
# ------------------------------------------------------------------------ | ||
# Copyright (C) 2022-24, Gufo Labs | ||
# ------------------------------------------------------------------------ | ||
|
||
PGO_DATA_DIR=$1 | ||
if [ "$PGO_DATA_DIR" = "" ]; then | ||
echo "PGO data dir must be set" | ||
exit 1 | ||
fi | ||
|
||
# Collect PGO | ||
echo "Building profiling version" | ||
RUSTFLAGS="-Cprofile-generate=$PGO_DATA_DIR" python3 -m pip install --editable . | ||
echo "Collecting PGO data" | ||
PYTHONPATH=src/:$PYTHONPATH python3 ./tools/build/pgo-runner.py | ||
echo "Merging profdata" | ||
$(./tools/build/get-rustup-bin.sh)/llvm-profdata merge -o $PGO_DATA_DIR/merged.profdata $PGO_DATA_DIR | ||
echo "PGO profile is written into $PGO_DATA_DIR/merged.profdata" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters