Browse Source

More parametrisation and added section sizes as requested

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
trying.tmp
Daniel Egger 3 years ago
parent
commit
d299c1deec
  1. 17
      tools/capture_example_bloat.sh
  2. 17
      tools/capture_nightly_example_bloat.sh

17
tools/capture_example_bloat.sh

@ -1,6 +1,7 @@
#!/bin/bash
version="stable"
features="stm32f042,rt"
filename="bloat_log_"$version"_"`date -Iminutes`".txt"
filenamenoopt="bloat_noopt_log_"$version"_"`date -Iminutes`".txt"
@ -11,12 +12,20 @@ cargo +$version rustc -- -V >>$filenamenoopt
for i in `find examples -name "*.rs"`; do
name=$(echo $i | sed -e "s,examples/,,g" -e "s,\.rs,,g")
echo "Processing example $name"
echo >>$filename
echo >>$filenamenoopt
echo "Bloat for example $name" >>$filename
cargo +$version bloat --release --example $name --features="$features" -n 60 >>$filename
echo >>$filename
echo "Section sizes: " >>$filename
cargo +$version size --release --example $name --features="$features" >>$filename
echo >>$filenamenoopt
echo "Bloat for example $name" >>$filenamenoopt
cargo +$version bloat --release --example $name --features="stm32f042,rt" -n 60 >>$filename
cargo +$version bloat --example $name --features="stm32f042,rt" -n 60 >>$filenamenoopt
cargo +$version bloat --example $name --features="$features" -n 60 >>$filenamenoopt
echo >>$filenamenoopt
echo "Section size: " >>$filenamenoopt
cargo +$version size --example $name --features="$features" >>$filenamenoopt
done
echo "Captured bloat for rustc version \"$version\" for all examples into $filename and $filenamenoopt"
echo "Captured bloat for rustc version \"$version\" for all examples with features \"$features\" into $filename and $filenamenoopt"

17
tools/capture_nightly_example_bloat.sh

@ -1,6 +1,7 @@
#!/bin/bash
version="nightly"
features="stm32f042,rt"
filename="bloat_log_"$version"_"`date -Iminutes`".txt"
filenamenoopt="bloat_noopt_log_"$version"_"`date -Iminutes`".txt"
@ -11,12 +12,20 @@ cargo +$version rustc -- -V >>$filenamenoopt
for i in `find examples -name "*.rs"`; do
name=$(echo $i | sed -e "s,examples/,,g" -e "s,\.rs,,g")
echo "Processing example $name"
echo >>$filename
echo >>$filenamenoopt
echo "Bloat for example $name" >>$filename
cargo +$version bloat --release --example $name --features="$features" -n 60 >>$filename
echo >>$filename
echo "Section sizes: " >>$filename
cargo +$version size --release --example $name --features="$features" >>$filename
echo >>$filenamenoopt
echo "Bloat for example $name" >>$filenamenoopt
cargo +$version bloat --release --example $name --features="stm32f042,rt" -n 60 >>$filename
cargo +$version bloat --example $name --features="stm32f042,rt" -n 60 >>$filenamenoopt
cargo +$version bloat --example $name --features="$features" -n 60 >>$filenamenoopt
echo >>$filenamenoopt
echo "Section size: " >>$filenamenoopt
cargo +$version size --example $name --features="$features" >>$filenamenoopt
done
echo "Captured bloat for rustc version \"$version\" for all examples into $filename and $filenamenoopt"
echo "Captured bloat for rustc version \"$version\" for all examples with features \"$features\" into $filename and $filenamenoopt"

Loading…
Cancel
Save