sled/scripts/instructions

31 lines
897 B
Plaintext
Raw Permalink Normal View History

#!/bin/sh
# counts instructions for a standard workload
set -e
OUTFILE="cachegrind.stress2.`git describe --always --dirty`-`date +%s`"
2019-03-16 23:17:51 +00:00
rm -rf default.sled || true
cargo build \
--bin=stress2 \
--release
2019-03-16 23:17:51 +00:00
# --tool=callgrind --dump-instr=yes --collect-jumps=yes --simulate-cache=yes \
# --callgrind-out-file="$OUTFILE" \
valgrind \
--tool=cachegrind \
--cachegrind-out-file="$OUTFILE" \
2019-03-16 23:17:51 +00:00
./target/release/stress2 --total-ops=50000 --set-prop=1000000000000 --threads=1
LAST=`ls -t cachegrind.stress2.* | sed -n 2p`
2019-03-16 23:17:51 +00:00
echo "comparing $LAST with new $OUTFILE"
echo "--------------------------------------------------------------------------------"
echo "change since last run:"
echo " Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw"
echo "--------------------------------------------------------------------------------"
cg_diff $LAST $OUTFILE | tail -1