Improved cache utilisation plotting tool

This commit is contained in:
(Tim) Efthimis Kritikos 2023-05-18 20:15:52 +01:00
parent 1b510e4781
commit 64f5da82b0

View File

@ -22,9 +22,13 @@ jq -r '.Cycles[]| [.C,.L1,.VDI]|@csv' -- "$IN" > "$CSV_FILE"
BASE_GNUPLOT_OPTIONS="set datafile separator ',';set term svg;set output \"${OUT}\";" BASE_GNUPLOT_OPTIONS="set datafile separator ',';set term svg;set output \"${OUT}\";"
parse_cache_size(){
CACHE_SIZE=$(jq -r .L1_size -- "$IN")
}
case "$2" in case "$2" in
"cache_time") "cache_time")
CACHE_SIZE=$(jq -r .L1_size -- "$IN") parse_cache_size
gnuplot -e "${BASE_GNUPLOT_OPTIONS}\ gnuplot -e "${BASE_GNUPLOT_OPTIONS}\
set xlabel \"Clock cycles\";\ set xlabel \"Clock cycles\";\
set ylabel \"Cache utilisation (bytes)\";\ set ylabel \"Cache utilisation (bytes)\";\
@ -32,13 +36,15 @@ set offsets 0, 0, 3, 1;\
set ytics 0,1,$((CACHE_SIZE-1));\ set ytics 0,1,$((CACHE_SIZE-1));\
unset colorbox;\ unset colorbox;\
set ytics add (\"Valid\" -1);\ set ytics add (\"Valid\" -1);\
set grid ytics;\
set yrange [-2:${CACHE_SIZE}];\
set palette model RGB defined ( 0 'red', 1 'green' );\ set palette model RGB defined ( 0 'red', 1 'green' );\
plot '${CSV_FILE}' using 1:2 with lines notitle ,\ plot '${CSV_FILE}' using 1:2 with histeps notitle ,\
'${CSV_FILE}' using 1:(-0.75):(0):(-0.5):3 with vectors nohead palette notitle" '${CSV_FILE}' using 1:(-0.75):(0):(-0.5):3 with vectors nohead palette notitle"
;; ;;
"cache_util_freq") "cache_util_freq")
CACHE_SIZE=$(jq -r .L1_size -- "$IN") parse_cache_size
gnuplot -e "${BASE_GNUPLOT_OPTIONS}\ gnuplot -e "${BASE_GNUPLOT_OPTIONS}\
set xlabel \"Utilisation (bytes)\";\ set xlabel \"Utilisation (bytes)\";\
set ylabel \"Occurrences\";\ set ylabel \"Occurrences\";\