Skip to content

Commit 0eb47b8

Browse files
committed
Changing example files to accomodate Windows.
1 parent 2503cde commit 0eb47b8

11 files changed

+347
-818
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Contents
2+
3+
The directory 'scripts' contains the files:
4+
5+
* README.md
6+
* process_dcache_output.sh
7+
* default_gnp.inc
8+
* single_plot.gnp
9+
* multi_plot.gnp
10+
11+
and the directory 'sample_data'.
12+
13+
14+
# Examples
15+
16+
Executing the following commands:
17+
```
18+
gnuplot single_plot.gnp
19+
gnuplot multi_plot.gnp
20+
```
21+
will produce PDF files (single_plot.pdf and multi_plot.pdf)
22+
with graphs showing the data in the directory 'sample_data'.
23+
24+
25+
# Data Post-processing
26+
27+
To use these gnuplot programs with data generated by the cache benchmarks of
28+
CAT (cat_collect -dcr, and cat_collect -dcw), the user must post-process the
29+
output files of the benchmarks.
30+
Executing the bash script 'process_dcache_output.sh' using as input a data file
31+
generated by the data cache benchmarks will compute basic statistics
32+
(min, avg, max) of the data gathered by each thread for each test size. The output
33+
is automatically stored in a new file with the keyword '.stat' appended to its name.
34+
These ".stat" files can be used as input for the gnuplot scripts.
35+
36+
37+
# Modifying the Gnuplot scripts
38+
39+
The example scripts 'single_plot.gnp' and 'multi_plot.gnp' contain variables
40+
(at the top of each script) that must be modified to fit the user's use case and
41+
environment.
42+
43+
* The variables 'L1_per_core', 'L2_per_core', and 'L3_per_core' must be set to
44+
indicate the sizes of the caches per core
45+
46+
* The variables 'SML_STRIDE', 'BIG_STRIDE', 'SML_PPB', and 'BIG_PPB' must be set
47+
to the corresponding values reported in the benchmark output file.
48+
49+
* The directory 'DIR' where the user data resides, the name of the event 'EVENT' whose
50+
data is being plotted, and the plot title 'PLOT_TITLE'.

src/counter_analysis_toolkit/scripts/README.txt

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/counter_analysis_toolkit/scripts/default.gnp renamed to src/counter_analysis_toolkit/scripts/default_gnp.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ set key maxcolumns 0 maxrows 0
3535
set key noopaque
3636
unset label
3737
unset arrow
38-
set style increment default
3938
unset style line
4039
unset style arrow
4140
set style histogram clustered gap 2 title textcolor lt -1

src/counter_analysis_toolkit/scripts/multi_plot.gnp

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
L1_per_core=48*1024
2-
L2_per_core=1280*1024
3-
L3_per_core=36864*1024/4
1+
L1_per_core=32768
2+
L2_per_core=1048576
3+
L3_per_core=4194304
4+
5+
SML_STRIDE=128
6+
BIG_STRIDE=256
7+
SML_PPB=16
8+
BIG_PPB=512
49

510
DIR="sample_data/"
6-
EVENT1="L2_RQSTS:DEMAND_DATA_RD_MISS"
7-
EVENT2="L2_RQSTS:DEMAND_DATA_RD_HIT"
8-
EVENT3="L2_RQSTS:ALL_DEMAND_REFERENCES"
9-
PLOT_TITLE="L2_RQSTS (MISS/HIT/REF)"
11+
EVENT1="PM_DATA_FROM_L2"
12+
EVENT2="PM_DATA_FROM_L3"
13+
EVENT3="PM_DATA_FROM_L3MISS"
14+
PLOT_TITLE="L2 Reads / L3_reads / L3 Misses"
1015

1116
SUFFIX=".data.reads.stat"
1217

@@ -18,7 +23,7 @@ set label 3 at L2_per_core+(L3_per_core-L2_per_core)/20, graph 1.020 "L3" font
1823
set terminal pdfcairo noenhanced font "Sans,12"
1924
set output "multi_plot.pdf"
2025

21-
load "default.gnp"
26+
load "default_gnp.inc"
2227

2328
set xtics ("" L1_per_core, "" L2_per_core, "" L3_per_core)
2429

@@ -31,15 +36,16 @@ unset key
3136
set multiplot layout 1,6 title PLOT_TITLE."
3237

3338
set margin 0,0,1.5,2.5
34-
set label 20 "Event Count" at screen 0.015,0.375 rotate by 90 # Y-label
39+
set label 20 "Normalized Event Count" at screen 0.015,0.26 rotate by 90 # Y-label
40+
3541

3642
OFFSET=0.09
3743
GAP=0.015
3844
WIDTH=(1.0-(OFFSET+5.0*GAP+GAP/4.0))/6.0
3945

4046

4147
###
42-
set label 21 "RND:64:256" at graph 0.1,-0.05 font ",10" # X-label
48+
set label 21 sprintf("RND:%d:%d",SML_STRIDE,BIG_PPB) at graph 0.1,-0.05 font ",10" # X-label
4349
set size 0.1475,1
4450
set size WIDTH,1
4551
set origin OFFSET,0.0
@@ -55,7 +61,7 @@ set ytics scale 0.1,0.5
5561
unset label 20
5662

5763
###
58-
set label 21 "RND:64:16" at graph 0.16,-0.05 font ",10" # X-label
64+
set label 21 sprintf("RND:%d:%d",SML_STRIDE,SML_PPB) at graph 0.16,-0.05 font ",10" # X-label
5965
set object 1 rectangle from graph 0,0 to graph 1,1 behind fillcolor rgb '#FFFAE8' fillstyle solid noborder
6066
set size WIDTH,1
6167
set origin OFFSET+(WIDTH+GAP)*1,0
@@ -66,7 +72,7 @@ plot \
6672
unset object 1
6773

6874
###
69-
set label 21 "RND:128:256" at graph 0.1,-0.05 font ",10" # X-label
75+
set label 21 sprintf("RND:%d:%d",BIG_STRIDE,BIG_PPB) at graph 0.1,-0.05 font ",10" # X-label
7076
set size WIDTH,1
7177
set origin OFFSET+(WIDTH+GAP)*2,0
7278
plot \
@@ -75,7 +81,7 @@ plot \
7581
FILE3 every :::2::2 using 1:2 w lp ls 1
7682

7783
###
78-
set label 21 "RND:128:16" at graph 0.1,-0.05 font ",10" # X-label
84+
set label 21 sprintf("RND:%d:%d",BIG_STRIDE,SML_PPB) at graph 0.1,-0.05 font ",10" # X-label
7985
set object rectangle from graph 0,0 to graph 1,1 behind fillcolor rgb '#FFFAE8' fillstyle solid noborder
8086
set size WIDTH,1
8187
set origin OFFSET+(WIDTH+GAP)*3,0
@@ -85,7 +91,7 @@ plot \
8591
FILE3 every :::3::3 using 1:2 w lp ls 1
8692

8793
###
88-
set label 21 "SEQ:64" at graph 0.25,-0.05 font ",10" # X-label
94+
set label 21 sprintf("SEQ:%d",SML_STRIDE) at graph 0.25,-0.05 font ",10" # X-label
8995
set object rectangle from graph 0,0 to graph 1,1 behind fillcolor rgb '#F0F6FF' fillstyle solid noborder
9096
set size WIDTH,1
9197
set origin OFFSET+(WIDTH+GAP)*4,0
@@ -95,8 +101,11 @@ plot \
95101
FILE3 every :::4::4 using 1:2 w lp ls 1
96102

97103
###
98-
set key top right font ",6"
99-
set label 21 "SEQ:128" at graph 0.2,-0.05 font ",10" # X-label
104+
set key at screen 0.997,0.997
105+
set key font ",6"
106+
set key opaque box samplen 4 width 2 height 1
107+
108+
set label 21 sprintf("SEQ:%d",BIG_STRIDE) at graph 0.2,-0.05 font ",10" # X-label
100109
set object rectangle from graph 0,0 to graph 1,1 behind fillcolor rgb '#F0F6FF' fillstyle solid noborder
101110
set size WIDTH,1
102111
set origin OFFSET+(WIDTH+GAP)*5,0

0 commit comments

Comments
 (0)