-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up the memory benchmark scripts and add a couple more for conve…
…nience. In general we make the scripts a bit more flexible, removing fixed names and adding some more output formats. There are also two more scripts to run full sets of profiling and memory copying benchmarks. memcpy-benchmarks/ * count-top-funcs.sh: Give flexibility in the variants to be counted and add a cutoff option; allow a raw output format, so the results can be used in profile-all-funcs.sh. * extract-top-level-funcs.sh: Add some more sorting of results. * profile-all-funcs.sh: Sort results by function name. * run-all.sh: Created. * run-memcpy.sh: Small cleanups. * run-perf.sh: Likewise. * run-sequence-all.sh: Created. * run-sequence.sh: More options to configure sequence, scale iterations by size of block, output number of iterations used. * vmemcpy-main.c: Remove a blank line. Signed-off-by: Jeremy Bennett <[email protected]>
- Loading branch information
1 parent
ccc9dd1
commit 67750ca
Showing
9 changed files
with
314 additions
and
222 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
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,56 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (C) 2024 Embecosm Limited <www.embecosm.com> | ||
# Contributor Jeremy Bennett <[email protected]> | ||
|
||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
# A script to do multiple performance profiling runs | ||
|
||
tooldir="$(cd $(dirname $(dirname $(readlink -f $0))) ; pwd)" | ||
topdir="$(cd $(dirname ${tooldir}) ; pwd)" | ||
memcpydir="${tooldir}/memcpy-benchmarks" | ||
qemudir=${topdir}/qemu | ||
|
||
logfile=${memcpydir}/run-all.log | ||
rm -f ${logfile} | ||
touch ${logfile} | ||
|
||
ids="ef9e258b94376c5017b4df9fe061abcadc9661f2 \ | ||
7809b7fafbc24c557751a1845bb1ccc0b9376f90" | ||
|
||
export PATH=${topdir}/install/bin:${PATH} | ||
which qemu-riscv64 2>&1 | tee -a ${logfile} | ||
|
||
# Build all the programs to benchmark | ||
cd ${memcpydir} | ||
make | ||
|
||
# Now do the profiling | ||
for c in ${ids} | ||
do | ||
resfile="${memcpydir}/results-${c}" | ||
echo "Checking out QEMU commit ${c}..." 2>&1 | tee -a ${logfile} | ||
date 2>&1 | tee -a ${logfile} | ||
pushd ${qemudir} > /dev/null 2>&1 | ||
git checkout ${c} 2>&1 | tee -a ${logfile} | ||
popd > /dev/null 2>&1 | ||
|
||
echo "Building QEMU for commit ${c}..." 2>&1 | tee -a ${logfile} | ||
date 2>&1 | tee -a ${logfile} | ||
pushd ${tooldir} > /dev/null 2>&1 | ||
./build-all.sh --qemu-only --clean-qemu --qemu-cflags "-g" \ | ||
--qemu-configs "--disable-plugins" 2>&1 | tee -a ${logfile} | ||
popd > /dev/null 2>&1 | ||
|
||
echo "Running perf for commit ${c}..." 2>&1 | tee -a ${logfile} | ||
date 2>&1 | tee -a ${logfile} | ||
pushd ${memcpydir} > /dev/null 2>&1 | ||
mkdir -p "${resfile}" | ||
./run-perf.sh 2>&1 | tee -a ${logfile} | ||
|
||
echo "Putting results in ${resfile}..." 2>&1 | tee -a ${logfile} | ||
mv prof-*.res "${resfile}" | ||
date 2>&1 | tee -a ${logfile} | ||
popd > /dev/null 2>&1 | ||
done |
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
Oops, something went wrong.