Allow overriding barriereList and commList
This commit is contained in:
parent
e49eaecf18
commit
6899dea515
|
@ -2,16 +2,58 @@
|
||||||
|
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
#barriereList="jikes_barrier asm_cache c_cache fake"
|
init_bench_vars ()
|
||||||
barriereList="jikes_barrier asm_cache c_cache"
|
{
|
||||||
communicationList="asm_cache c_cache shared_mem shared_mem_opt pipe"
|
local -
|
||||||
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"
|
#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 ()
|
use_histo ()
|
||||||
{
|
{
|
||||||
|
@ -319,12 +361,12 @@ create_gnuplot_file ()
|
||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
local -
|
local logDir -
|
||||||
|
|
||||||
if [ -n "$1" ]
|
init_bench_vars
|
||||||
then
|
parse_args "$@"
|
||||||
cd "$1"
|
cd $logDir
|
||||||
fi
|
init_log_vars
|
||||||
|
|
||||||
for prod in $prodList ; do
|
for prod in $prodList ; do
|
||||||
case "$prod" in
|
case "$prod" in
|
||||||
|
|
Loading…
Reference in New Issue