Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script for performing compilation size regression investigations. #15303

Merged
merged 8 commits into from
Nov 26, 2021
Merged
Changes from 1 commit
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
Next Next commit
Add script for performing compilation size regression investigations.
  • Loading branch information
tzarc committed Nov 25, 2021
commit 4316d043f52ccead1da5c85fad01cec11ad86551
26 changes: 26 additions & 0 deletions util/size_regression.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

if [[ -z $1 ]] ; then
echo "Usage: $0 planck/rev6:default"
exit 1
fi

keyboard_target=$1

function build_executor() {
git rev-list --oneline --no-merges 0.11.0...upstream/develop ^upstream/master | while IFS= read -r line ; do
revision=$(echo $line | cut -d' ' -f1)

make distclean >/dev/null 2>&1
git checkout $revision >/dev/null 2>&1
make -j $keyboard_target >/dev/null 2>&1
file_size=$(arm-none-eabi-size .build/*.elf | awk '/elf/ {print $1}')

printf "%8d -- %s\n" "$file_size" "$line"
done
}

# The actual execution of all the builds needs to be the last command in the entire script
# - During builds, this script file will disappear, so we need the entire script to be
# loaded into the script interpreter at the time of execution. Do not refactor.
build_executor