Allow overriding barriereList and commList
This commit is contained in:
parent
e49eaecf18
commit
6899dea515
|
@ -2,16 +2,58 @@
|
|||
|
||||
set -u
|
||||
|
||||
#barriereList="jikes_barrier asm_cache c_cache fake"
|
||||
barriereList="jikes_barrier asm_cache c_cache"
|
||||
communicationList="asm_cache c_cache shared_mem shared_mem_opt pipe"
|
||||
comList=`ls *.log | perl -ni -e '/-([^-]+)_comm/; $a{$1}=""; END { foreach ( sort keys %a ) {print "$_ "}}'`
|
||||
cacheList=`ls *log | perl -ni -e '/cache_([^-]+)-/; $a{$1}=""; END { foreach ( sort keys %a ) {print "$_ "}}'`
|
||||
prodList=`ls *.log | perl -ni -e '/typeProd_([^-]+)-/; $a{$1}=""; END { foreach ( sort keys %a ) {print "$_ "}}'`
|
||||
firstBarriereComm=`echo $barriereList | sed -r "s/^[^ ]* .*$//"`
|
||||
argTypeProdList=`eval ls *typeProd_useless_loop*${firstBarriereComm}_comm.log | perl -ni -e '/argTypeProd_([\d]+)-/; $a{$1}=""; END { foreach ( sort { $a <=> $b } keys %a ) {print "$_ "}}'`
|
||||
init_bench_vars ()
|
||||
{
|
||||
local -
|
||||
|
||||
metriqueList="cache_hits cache_miss cycles total_time"
|
||||
#barriereList="jikes_barrier asm_cache c_cache fake"
|
||||
barriereList="jikes_barrier asm_cache c_cache"
|
||||
communicationList="asm_cache c_cache shared_mem shared_mem_opt pipe"
|
||||
}
|
||||
|
||||
init_log_vars ()
|
||||
{
|
||||
local firstBarriereComm -
|
||||
|
||||
comList=`ls *.log | perl -ni -e '/-([^-]+)_comm/; $a{$1}=""; END { foreach ( sort keys %a ) {print "$_ "}}'`
|
||||
cacheList=`ls *log | perl -ni -e '/cache_([^-]+)-/; $a{$1}=""; END { foreach ( sort keys %a ) {print "$_ "}}'`
|
||||
prodList=`ls *.log | perl -ni -e '/typeProd_([^-]+)-/; $a{$1}=""; END { foreach ( sort keys %a ) {print "$_ "}}'`
|
||||
firstBarriereComm=`echo $barriereList | sed -r "s/^[^ ]* .*$//"`
|
||||
argTypeProdList=`eval ls *typeProd_useless_loop*${firstBarriereComm}_comm.log | perl -ni -e '/argTypeProd_([\d]+)-/; $a{$1}=""; END { foreach ( sort { $a <=> $b } keys %a ) {print "$_ "}}'`
|
||||
metriqueList="cache_hits cache_miss cycles total_time"
|
||||
}
|
||||
|
||||
parse_args ()
|
||||
{
|
||||
local opt optNum -
|
||||
|
||||
if [ $# -gt 0 ]
|
||||
then
|
||||
optNum=0
|
||||
while [ $# -gt $optNum ]
|
||||
do
|
||||
optNum=$((optNum + 1))
|
||||
eval opt=\$$optNum
|
||||
case $opt in
|
||||
"-e")
|
||||
if [ $# -gt $optNum ]
|
||||
then
|
||||
optNum=$((optNum + 1))
|
||||
eval opt=\$$optNum
|
||||
eval "$opt"
|
||||
else
|
||||
echo "Missing argument after \"-e\""
|
||||
return 1
|
||||
fi ;;
|
||||
*)
|
||||
logDir="$opt" ;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
logDir=$(pwd)
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
use_histo ()
|
||||
{
|
||||
|
@ -319,12 +361,12 @@ create_gnuplot_file ()
|
|||
|
||||
main()
|
||||
{
|
||||
local -
|
||||
local logDir -
|
||||
|
||||
if [ -n "$1" ]
|
||||
then
|
||||
cd "$1"
|
||||
fi
|
||||
init_bench_vars
|
||||
parse_args "$@"
|
||||
cd $logDir
|
||||
init_log_vars
|
||||
|
||||
for prod in $prodList ; do
|
||||
case "$prod" in
|
||||
|
|
Loading…
Reference in New Issue