From c947c24cf2e431ec55a7e4695da41e0b971d2be2 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Wed, 2 Mar 2011 12:44:00 +0100 Subject: [PATCH] [commtech] Handle more than 2 cache hierarchies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rewrite creation of simple gnuplot to handle more than 2 cache hierarchies (like L2, CPU and mem for sibling cores on same CPU, non-sibling cores on same CPU and non sibling cores on different CPU). --- communication_techniques/parsing.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/communication_techniques/parsing.sh b/communication_techniques/parsing.sh index c53af20..84c0834 100755 --- a/communication_techniques/parsing.sh +++ b/communication_techniques/parsing.sh @@ -295,7 +295,7 @@ create_gnuplot_header () create_simple_gnuplot_body () { - local metrique ylabel yscale patternPlotFile datFile numCacheConfigs - + local metrique ylabel yscale patternPlotFile datFile numCacheConfigs i - ylabel="$1" lineNum="$2" datFile="$3" @@ -305,12 +305,16 @@ create_simple_gnuplot_body () echo "set ylabel \"$ylabel\"" >> $patternPlotFile.gnuplot echo "set output 'images/$patternPlotFile.ps'" >> $patternPlotFile.gnuplot echo -n "plot '$datFile' every 3::$lineNum using 2:xtic(1)" >> $patternPlotFile.gnuplot - if [ $numCacheConfigs -gt 2 ] + if [ $numCacheConfigs -ge 2 ] then - echo " , '' every 3::$lineNum u 3" >> $patternPlotFile.gnuplot - else - echo "" >> patternPlotFile.gnuplot + i=2 + while [ $i -le $numCacheConfigs ] + do + echo -n " , '' every 3::$lineNum u $((i+1))" >> $patternPlotFile.gnuplot + i=$((i+1)) + done fi + echo "" >> patternPlotFile.gnuplot } create_complex_gnuplot_body ()