From 04c88faf01580e287b557c45a15d998715df64f1 Mon Sep 17 00:00:00 2001 From: Anish-Saxena Date: Sun, 14 Aug 2022 09:42:53 -0400 Subject: [PATCH] added Figure 10 stat collection script and fixed typos --- gem5/scripts/bench_common.pl | 33 ++++--- .../graph_scripts/aqua_MICRO22_plots.ipynb | 8 +- .../stats_scripts/Figure_10.fpt_lookups.rq.sh | 59 +++++++++++ .../stats_scripts/Figure_9.perf.rq.drit.sh | 8 +- .../scripts/stats_scripts/collect_all_data.sh | 3 +- .../stats_scripts/data/fpt_lookup_btv.stat | 1 + .../stats_scripts/data/fpt_lookup_cache.stat | 1 + .../stats_scripts/data/fpt_lookup_dram.stat | 1 + .../stats_scripts/data/fpt_lookup_orr.stat | 1 + gem5/scripts/stats_scripts/data/test.stat | 37 +++++++ gem5/scripts/stats_scripts/test.sh | 99 +++++++++++++++++++ 11 files changed, 228 insertions(+), 23 deletions(-) create mode 100755 gem5/scripts/stats_scripts/Figure_10.fpt_lookups.rq.sh create mode 100644 gem5/scripts/stats_scripts/data/fpt_lookup_btv.stat create mode 100644 gem5/scripts/stats_scripts/data/fpt_lookup_cache.stat create mode 100644 gem5/scripts/stats_scripts/data/fpt_lookup_dram.stat create mode 100644 gem5/scripts/stats_scripts/data/fpt_lookup_orr.stat create mode 100644 gem5/scripts/stats_scripts/data/test.stat create mode 100755 gem5/scripts/stats_scripts/test.sh diff --git a/gem5/scripts/bench_common.pl b/gem5/scripts/bench_common.pl index b37898f1..ebbcfee1 100755 --- a/gem5/scripts/bench_common.pl +++ b/gem5/scripts/bench_common.pl @@ -276,13 +276,13 @@ mix7 mix8 mix9 -mix11 +mix10 +mix11 +mix12 mix13 -mix14 -mix16 -mix17 -mix18 -mix19'; +mix14 +mix15 +mix16'; $SUITES{'spec17_bh_all'} = 'perlbench @@ -304,16 +304,18 @@ mix2 mix3 mix4 +mix5 mix6 mix7 mix8 mix9 -mix11 -mix14 -mix16 -mix17 -mix18 -mix19'; +mix10 +mix11 +mix12 +mix13 +mix14 +mix15 +mix16'; $SUITES{'spec17_single'} = 'perlbench @@ -345,7 +347,10 @@ mix7 mix8 mix9 -mix11 +mix10 +mix11 +mix12 mix13 -mix14 +mix14 +mix15 mix16'; diff --git a/gem5/scripts/graph_scripts/aqua_MICRO22_plots.ipynb b/gem5/scripts/graph_scripts/aqua_MICRO22_plots.ipynb index 9c456fc4..2da73123 100755 --- a/gem5/scripts/graph_scripts/aqua_MICRO22_plots.ipynb +++ b/gem5/scripts/graph_scripts/aqua_MICRO22_plots.ipynb @@ -774,10 +774,10 @@ "\n", "# Read Dataframe\n", "df = pd.read_csv(\"../stats_scripts/data/hitloc_rq_drit.stat\", delimiter='\\s+')\n", - "df['BF-0'] = df['BF-0'].str.rstrip('%').astype('float') / 100.0\n", - "df['Cache-Hit'] = df['Cache-Hit'].str.rstrip('%').astype('float') / 100.0\n", - "df['Singleton'] = df['Singleton'].str.rstrip('%').astype('float') / 100.0\n", - "df['DRAM-Acco'] = df['DRAM-Acco'].str.rstrip('%').astype('float') / 100.0\n", + "# df['BF-0'] = df['BF-0'].str.rstrip('%').astype('float') / 100.0\n", + "# df['Cache-Hit'] = df['Cache-Hit'].str.rstrip('%').astype('float') / 100.0\n", + "# df['Singleton'] = df['Singleton'].str.rstrip('%').astype('float') / 100.0\n", + "# df['DRAM-Acco'] = df['DRAM-Acco'].str.rstrip('%').astype('float') / 100.0\n", "print (df)\n", "\n", "# Set position of bar on X axis\n", diff --git a/gem5/scripts/stats_scripts/Figure_10.fpt_lookups.rq.sh b/gem5/scripts/stats_scripts/Figure_10.fpt_lookups.rq.sh new file mode 100755 index 00000000..18e21f30 --- /dev/null +++ b/gem5/scripts/stats_scripts/Figure_10.fpt_lookups.rq.sh @@ -0,0 +1,59 @@ +cd .. +mkdir -p stats_scripts/data + +## Calculating Mitigations for RRS ### + +# All SPEC workloads +perl getdata.pl -noxxxx -w spec17_all -dstat "rh_btv_true_pos|rh_btv_false_pos|rh_btv_true_neg" -nstat "rh_btv_true_neg" \ + -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C \ + | sed 's/[_A-Z0-9]*[\/]*AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C/BF-0/' \ + | sed 's/[_A-Z]*\///' \ + | column -t > stats_scripts/data/fpt_lookup_btv.stat ; + +perl getdata.pl -noxxxx -w spec17_all -dstat "rh_btv_true_pos|rh_btv_false_pos|rh_btv_true_neg" -nstat "rh_cache_hit" \ + -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C \ + | sed 's/[_A-Z0-9]*[\/]*AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C/Cache-Hit/' \ + | sed 's/[_A-Z]*\///' | column -t > stats_scripts/data/fpt_lookup_cache.stat ; + +perl getdata.pl -noxxxx -w spec17_all -dstat "rh_btv_true_pos|rh_btv_false_pos|rh_btv_true_neg" -nstat "rh_cache_partial_hit_orr_set" \ + -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C \ + | sed 's/[_A-Z0-9]*[\/]*AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C/Singleton/' \ + | sed 's/[_A-Z]*\///' | column -t > stats_scripts/data/fpt_lookup_orr.stat ; + +perl getdata.pl -noxxxx -w spec17_all -dstat "rh_btv_true_pos|rh_btv_false_pos|rh_btv_true_neg" -nstat "rh_cache_partial_hit_orr_unset|rh_cache_miss" \ + -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C \ + | sed 's/[_A-Z0-9]*[\/]*AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C/DRAM-Acco/' \ + | sed 's/[_A-Z]*\///' | column -t > stats_scripts/data/fpt_lookup_dram.stat ; + +paste stats_scripts/data/fpt_lookup_btv.stat stats_scripts/data/fpt_lookup_cache.stat \ + stats_scripts/data/fpt_lookup_orr.stat stats_scripts/data/fpt_lookup_dram.stat \ + | column -s $'\t' -t | awk '{print $1, $2, $4, $6, $8}' | column -t > stats_scripts/data/hitloc_rq_drit.stat ; + +echo ". 0 0 0 0" | column -t >> stats_scripts/data/hitloc_rq_drit.stat ; + +# All SPEC workloads +perl getdata.pl -noxxxx -nh -ns -amean -w spec17_all -dstat "rh_btv_true_pos|rh_btv_false_pos|rh_btv_true_neg" -nstat "rh_btv_true_neg" \ + -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C \ + | sed 's/[_A-Z0-9]*[\/]*AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C/BF-0/' \ + | sed 's/[_A-Z]*\///' | sed 's/Amean/AMEAN/' | column -t > stats_scripts/data/fpt_lookup_btv.stat ; + +perl getdata.pl -noxxxx -nh -ns -amean -w spec17_all -dstat "rh_btv_true_pos|rh_btv_false_pos|rh_btv_true_neg" -nstat "rh_cache_hit" \ + -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C \ + | sed 's/[_A-Z0-9]*[\/]*AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C/Cache-Hit/' \ + | sed 's/[_A-Z]*\///' | sed 's/Amean/AMEAN/' | column -t > stats_scripts/data/fpt_lookup_cache.stat ; + +perl getdata.pl -noxxxx -nh -ns -amean -w spec17_all -dstat "rh_btv_true_pos|rh_btv_false_pos|rh_btv_true_neg" -nstat "rh_cache_partial_hit_orr_set" \ + -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C \ + | sed 's/[_A-Z0-9]*[\/]*AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C/Singleton/' \ + | sed 's/[_A-Z]*\///' | sed 's/Amean/AMEAN/' | column -t > stats_scripts/data/fpt_lookup_orr.stat ; + +perl getdata.pl -noxxxx -nh -ns -amean -w spec17_all -dstat "rh_btv_true_pos|rh_btv_false_pos|rh_btv_true_neg" -nstat "rh_cache_partial_hit_orr_unset|rh_cache_miss" \ + -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C \ + | sed 's/[_A-Z0-9]*[\/]*AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C/DRAM-Acco/' \ + | sed 's/[_A-Z]*\///' | sed 's/Amean/AMEAN/' | column -t > stats_scripts/data/fpt_lookup_dram.stat ; + +paste stats_scripts/data/fpt_lookup_btv.stat stats_scripts/data/fpt_lookup_cache.stat \ + stats_scripts/data/fpt_lookup_orr.stat stats_scripts/data/fpt_lookup_dram.stat \ + | column -s $'\t' -t | awk '{print $1, $2, $4, $6, $8}' | column -t >> stats_scripts/data/hitloc_rq_drit.stat ; + +cat stats_scripts/data/hitloc_rq_drit.stat diff --git a/gem5/scripts/stats_scripts/Figure_9.perf.rq.drit.sh b/gem5/scripts/stats_scripts/Figure_9.perf.rq.drit.sh index 14e85b79..3b5bae39 100755 --- a/gem5/scripts/stats_scripts/Figure_9.perf.rq.drit.sh +++ b/gem5/scripts/stats_scripts/Figure_9.perf.rq.drit.sh @@ -8,15 +8,15 @@ mkdir -p stats_scripts/data perl getdata.pl -n 0 -w spec17_single -ipc 4 -ws -printmask 0-1-1-1 -b ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C1/AE.BASELINE.1C \ -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.BASELINE.4C \ ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.AQUA.SRAM_TABLES.1K.4C \ - ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.RQ.MEMORY_MAPPED_TABLES.1K.4C \ - | sed 's/[_A-Z0-9]*[\/]*AE.AQUA.SRAM_TABLES.1K.4C/AQUA-SRAM/' | sed 's/[_A-Z0-9]*[\/]*_16KB_CACHE_V2.1K.4C/AQUA-DRAM/' \ + ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C \ + | sed 's/[_A-Z0-9]*[\/]*AE.AQUA.SRAM_TABLES.1K.4C/AQUA-SRAM/' | sed 's/[_A-Z0-9]*[\/]*AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C/AQUA-DRAM/' \ | sed 's/[_A-Z]*\///' | column -t > stats_scripts/data/perf_rq_drit.stat ; # # MIX-16 workloads perl getdata.pl -n 0 -nh -w spec17_mix -ipc 4 -ws -printmask 0-1-1-1 -b ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C1/AE.BASELINE.1C \ -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.BASELINE.4C \ ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.AQUA.SRAM_TABLES.1K.4C \ - ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.RQ.MEMORY_MAPPED_TABLES.1K.4C \ + ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C \ | sed 's/[_A-Z]*\///' | column -t >> stats_scripts/data/perf_rq_drit.stat ; echo ". 0 0" | column -t >> stats_scripts/data/perf_rq_drit.stat ; @@ -25,7 +25,7 @@ echo ". 0 0" | column -t >> stats_scripts/data/perf_rq_drit.stat ; perl getdata.pl -gmean -n 0 -nh -ns -gmean -w spec17_all -ipc 4 -ws -printmask 0-1-1-1 -b ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C1/AE.BASELINE.1C \ -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.BASELINE.4C \ ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.AQUA.SRAM_TABLES.1K.4C \ - ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.RQ.MEMORY_MAPPED_TABLES.1K.4C \ + ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.AQUA.MEMORY_MAPPED_TABLES.1K.4C \ | sed 's/Gmean/Gmean-34/' | column -t >> stats_scripts/data/perf_rq_drit.stat; # Format diff --git a/gem5/scripts/stats_scripts/collect_all_data.sh b/gem5/scripts/stats_scripts/collect_all_data.sh index 8e2ba607..b602648b 100755 --- a/gem5/scripts/stats_scripts/collect_all_data.sh +++ b/gem5/scripts/stats_scripts/collect_all_data.sh @@ -1,7 +1,8 @@ #!/bin/bash -./Figure_3.rrs.scalablity.sh +./Figure_3.rrs.scalability.sh ./Figure_6.migrations.rq.rrs.sh ./Figure_7.perf.rq.rrs.sh ./Figure_9.perf.rq.drit.sh +./Figure_10.fpt_lookups.rq.sh ./Figure_11.sensitivity.rq.rth.sh \ No newline at end of file diff --git a/gem5/scripts/stats_scripts/data/fpt_lookup_btv.stat b/gem5/scripts/stats_scripts/data/fpt_lookup_btv.stat new file mode 100644 index 00000000..8dfc89f3 --- /dev/null +++ b/gem5/scripts/stats_scripts/data/fpt_lookup_btv.stat @@ -0,0 +1 @@ +AMEAN 0.922 diff --git a/gem5/scripts/stats_scripts/data/fpt_lookup_cache.stat b/gem5/scripts/stats_scripts/data/fpt_lookup_cache.stat new file mode 100644 index 00000000..902768d3 --- /dev/null +++ b/gem5/scripts/stats_scripts/data/fpt_lookup_cache.stat @@ -0,0 +1 @@ +AMEAN 0.073 diff --git a/gem5/scripts/stats_scripts/data/fpt_lookup_dram.stat b/gem5/scripts/stats_scripts/data/fpt_lookup_dram.stat new file mode 100644 index 00000000..2c4b9c2a --- /dev/null +++ b/gem5/scripts/stats_scripts/data/fpt_lookup_dram.stat @@ -0,0 +1 @@ +AMEAN 0.000 diff --git a/gem5/scripts/stats_scripts/data/fpt_lookup_orr.stat b/gem5/scripts/stats_scripts/data/fpt_lookup_orr.stat new file mode 100644 index 00000000..8d9c7579 --- /dev/null +++ b/gem5/scripts/stats_scripts/data/fpt_lookup_orr.stat @@ -0,0 +1 @@ +AMEAN 0.004 diff --git a/gem5/scripts/stats_scripts/data/test.stat b/gem5/scripts/stats_scripts/data/test.stat new file mode 100644 index 00000000..d701f4c8 --- /dev/null +++ b/gem5/scripts/stats_scripts/data/test.stat @@ -0,0 +1,37 @@ +Expts BF-0 Cache-Hit Singleton DRAM-Acco +perlbench 1.000 0.000 0.000 0.000 +gcc 0.794 0.197 0.010 0.000 +bwaves 1.000 0.000 0.000 0.000 +mcf 0.713 0.282 0.004 0.000 +cactuBSSN 1.000 0.000 0.000 0.000 +namd 1.000 0.000 0.000 0.000 +povray 1.000 0.000 0.000 0.000 +lbm 0.670 0.246 0.079 0.006 +wrf 1.000 0.000 0.000 0.000 +blender 0.491 0.498 0.010 0.000 +deepsjeng 1.000 0.000 0.000 0.000 +imagick 0.975 0.025 0.000 0.000 +leela 1.000 0.000 0.000 0.000 +nab 1.000 0.000 0.000 0.000 +exchange2 1.000 0.000 0.000 0.000 +roms 0.850 0.148 0.002 0.000 +xz 1.000 0.000 0.000 0.000 +parest 1.000 0.000 0.000 0.000 +mix1 0.994 0.006 0.000 0.000 +mix2 0.999 0.001 0.000 0.000 +mix3 1.000 0.000 0.000 0.000 +mix4 0.999 0.001 0.000 0.000 +mix5 0.925 0.074 0.001 0.000 +mix6 0.750 0.244 0.006 0.000 +mix7 0.991 0.009 0.000 0.000 +mix8 0.999 0.001 0.000 0.000 +mix9 0.913 0.086 0.001 0.000 +mix10 0.964 0.036 0.000 0.000 +mix11 0.813 0.173 0.014 0.000 +mix12 0.991 0.009 0.000 0.000 +mix13 0.777 0.217 0.005 0.000 +mix14 0.765 0.229 0.007 0.000 +mix15 0.999 0.001 0.000 0.000 +mix16 0.994 0.006 0.000 0.000 +. 0 0 0 0 +AMEAN 0.922 0.073 0.004 0.000 diff --git a/gem5/scripts/stats_scripts/test.sh b/gem5/scripts/stats_scripts/test.sh new file mode 100755 index 00000000..346da815 --- /dev/null +++ b/gem5/scripts/stats_scripts/test.sh @@ -0,0 +1,99 @@ +cd .. +mkdir -p stats_scripts/data + +## Calculating Mitigations for RRS ### + +# All SPEC workloads +perl getdata.pl -noxxxx -w spec17_all -dstat "rh_btv_true_pos|rh_btv_false_pos|rh_btv_true_neg" -nstat "rh_btv_true_neg" \ + -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/O3.25Bn.RQ.16KB_BTV_16KB_CACHE_V2.1K.4C \ + | sed 's/[_A-Z0-9]*[\/]*_16KB_CACHE_V2.1K.4C/BF-0/' \ + | sed 's/mix11/mix10/' | sed 's/mix13/mix11/' | sed 's/mix14/mix12/' | sed 's/mix16/mix13/' | sed 's/mix17/mix14/' | sed 's/mix18/mix15/' | sed 's/mix19/mix16/' \ + | sed 's/[_A-Z]*\///' \ + | column -t > stats_scripts/data/fpt_lookup_btv.stat ; + +perl getdata.pl -noxxxx -w spec17_all -dstat "rh_btv_true_pos|rh_btv_false_pos|rh_btv_true_neg" -nstat "rh_cache_hit" \ + -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/O3.25Bn.RQ.16KB_BTV_16KB_CACHE_V2.1K.4C \ + | sed 's/[_A-Z0-9]*[\/]*_16KB_CACHE_V2.1K.4C/Cache-Hit/' \ + | sed 's/mix11/mix10/' | sed 's/mix13/mix11/' | sed 's/mix14/mix12/' | sed 's/mix16/mix13/' | sed 's/mix17/mix14/' | sed 's/mix18/mix15/' | sed 's/mix19/mix16/' \ + | sed 's/[_A-Z]*\///' | column -t > stats_scripts/data/fpt_lookup_cache.stat ; + +perl getdata.pl -noxxxx -w spec17_all -dstat "rh_btv_true_pos|rh_btv_false_pos|rh_btv_true_neg" -nstat "rh_cache_partial_hit_orr_set" \ + -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/O3.25Bn.RQ.16KB_BTV_16KB_CACHE_V2.1K.4C \ + | sed 's/[_A-Z0-9]*[\/]*_16KB_CACHE_V2.1K.4C/Singleton/' \ + | sed 's/mix11/mix10/' | sed 's/mix13/mix11/' | sed 's/mix14/mix12/' | sed 's/mix16/mix13/' | sed 's/mix17/mix14/' | sed 's/mix18/mix15/' | sed 's/mix19/mix16/' \ + | sed 's/[_A-Z]*\///' | column -t > stats_scripts/data/fpt_lookup_orr.stat ; + +perl getdata.pl -noxxxx -w spec17_all -dstat "rh_btv_true_pos|rh_btv_false_pos|rh_btv_true_neg" -nstat "rh_cache_partial_hit_orr_unset|rh_cache_miss" \ + -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/O3.25Bn.RQ.16KB_BTV_16KB_CACHE_V2.1K.4C \ + | sed 's/[_A-Z0-9]*[\/]*_16KB_CACHE_V2.1K.4C/DRAM-Acco/' \ + | sed 's/mix11/mix10/' | sed 's/mix13/mix11/' | sed 's/mix14/mix12/' | sed 's/mix16/mix13/' | sed 's/mix17/mix14/' | sed 's/mix18/mix15/' | sed 's/mix19/mix16/' \ + | sed 's/[_A-Z]*\///' | column -t > stats_scripts/data/fpt_lookup_dram.stat ; + +paste stats_scripts/data/fpt_lookup_btv.stat stats_scripts/data/fpt_lookup_cache.stat \ + stats_scripts/data/fpt_lookup_orr.stat stats_scripts/data/fpt_lookup_dram.stat \ + | column -s $'\t' -t | awk '{print $1, $2, $4, $6, $8}' | column -t > stats_scripts/data/test.stat ; + +echo ". 0 0 0 0" | column -t >> stats_scripts/data/test.stat ; + +# All SPEC workloads +perl getdata.pl -noxxxx -nh -ns -amean -w spec17_all -dstat "rh_btv_true_pos|rh_btv_false_pos|rh_btv_true_neg" -nstat "rh_btv_true_neg" \ + -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/O3.25Bn.RQ.16KB_BTV_16KB_CACHE_V2.1K.4C \ + | sed 's/[_A-Z0-9]*[\/]*_16KB_CACHE_V2.1K.4C/BF-0/' \ + | sed 's/mix11/mix10/' | sed 's/mix13/mix11/' | sed 's/mix14/mix12/' | sed 's/mix16/mix13/' | sed 's/mix17/mix14/' | sed 's/mix18/mix15/' | sed 's/mix19/mix16/' \ + | sed 's/[_A-Z]*\///' | sed 's/Amean/AMEAN/' | column -t > stats_scripts/data/fpt_lookup_btv.stat ; + +perl getdata.pl -noxxxx -nh -ns -amean -w spec17_all -dstat "rh_btv_true_pos|rh_btv_false_pos|rh_btv_true_neg" -nstat "rh_cache_hit" \ + -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/O3.25Bn.RQ.16KB_BTV_16KB_CACHE_V2.1K.4C \ + | sed 's/[_A-Z0-9]*[\/]*_16KB_CACHE_V2.1K.4C/Cache-Hit/' \ + | sed 's/mix11/mix10/' | sed 's/mix13/mix11/' | sed 's/mix14/mix12/' | sed 's/mix16/mix13/' | sed 's/mix17/mix14/' | sed 's/mix18/mix15/' | sed 's/mix19/mix16/' \ + | sed 's/[_A-Z]*\///' | sed 's/Amean/AMEAN/' | column -t > stats_scripts/data/fpt_lookup_cache.stat ; + +perl getdata.pl -noxxxx -nh -ns -amean -w spec17_all -dstat "rh_btv_true_pos|rh_btv_false_pos|rh_btv_true_neg" -nstat "rh_cache_partial_hit_orr_set" \ + -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/O3.25Bn.RQ.16KB_BTV_16KB_CACHE_V2.1K.4C \ + | sed 's/[_A-Z0-9]*[\/]*_16KB_CACHE_V2.1K.4C/Singleton/' \ + | sed 's/mix11/mix10/' | sed 's/mix13/mix11/' | sed 's/mix14/mix12/' | sed 's/mix16/mix13/' | sed 's/mix17/mix14/' | sed 's/mix18/mix15/' | sed 's/mix19/mix16/' \ + | sed 's/[_A-Z]*\///' | sed 's/Amean/AMEAN/' | column -t > stats_scripts/data/fpt_lookup_orr.stat ; + +perl getdata.pl -noxxxx -nh -ns -amean -w spec17_all -dstat "rh_btv_true_pos|rh_btv_false_pos|rh_btv_true_neg" -nstat "rh_cache_partial_hit_orr_unset|rh_cache_miss" \ + -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/O3.25Bn.RQ.16KB_BTV_16KB_CACHE_V2.1K.4C \ + | sed 's/[_A-Z0-9]*[\/]*_16KB_CACHE_V2.1K.4C/DRAM-Acco/' \ + | sed 's/mix11/mix10/' | sed 's/mix13/mix11/' | sed 's/mix14/mix12/' | sed 's/mix16/mix13/' | sed 's/mix17/mix14/' | sed 's/mix18/mix15/' | sed 's/mix19/mix16/' \ + | sed 's/[_A-Z]*\///' | sed 's/Amean/AMEAN/' | column -t > stats_scripts/data/fpt_lookup_dram.stat ; + +paste stats_scripts/data/fpt_lookup_btv.stat stats_scripts/data/fpt_lookup_cache.stat \ + stats_scripts/data/fpt_lookup_orr.stat stats_scripts/data/fpt_lookup_dram.stat \ + | column -s $'\t' -t | awk '{print $1, $2, $4, $6, $8}' | column -t >> stats_scripts/data/test.stat ; + +#cat stats_scripts/data/migrations_rrs.stat +# rm stats_scripts/data/fpt_lookup_cache.stat stats_scripts/data/migrations2_rrs.stat stats_scripts/data/migrations3_rrs.stat + +# Format +# cat stats_scripts/data/migrations_rrs.stat + + +## Calculating Mitigations for RQ ### + +# # All SPEC workloads +# perl getdata.pl -noxxxx -w spec17_all -amean -nstat "rh_move" -dstat sim_seconds \ +# -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.AQUA.SRAM_TABLES.1K.4C \ +# | sed 's/[_A-Z0-9]*[\/]*O3.25Bn.RQ.16KB_BTV_16KB_CACHE_V2.1K.4C/AQUA/' \ +# | sed 's/[_A-Z]*\///' | column -t > stats_scripts/data/migrations1_rq.stat ; + +# perl getdata.pl -noxxxx -w spec17_all -amean -nstat "rh_move_to_qr_remove|rh_move_within_qr_remove" -dstat sim_seconds \ +# -d ../stats/multiprogram_16GBmem_250Mn.SPEC2017.C4/AE.AQUA.SRAM_TABLES.1K.4C \ +# | sed 's/[_A-Z0-9]*[\/]*O3.25Bn.RQ.16KB_BTV_16KB_CACHE_V2.1K.4C/AQUA/' \ +# | sed 's/[_A-Z]*\///' | column -t > stats_scripts/data/migrations2_rq.stat ; + +# paste stats_scripts/data/migrations1_rq.stat stats_scripts/data/migrations2_rq.stat \ +# | column -s $'\t' -t | awk '{print $1,($2+$4)*0.064}' | column -t > stats_scripts/data/migrations_rq.stat + +# # Format +# #cat stats_scripts/data/migrations_rq.stat +# # rm -rf stats_scripts/data/migrations_rq.stat stats_scripts/data/migrations_rrs.stat + +# #Join +# paste stats_scripts/data/migrations_rrs.stat stats_scripts/data/migrations_rq.stat \ +# | column -s $'\t' -t | awk '{print $1,$2, $4}' | column -t > stats_scripts/data/migrations_rrs_rq.stat + +# #Print +# cat stats_scripts/data/migrations_rrs_rq.stat