-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenGnuplot.py
More file actions
executable file
·514 lines (477 loc) · 26.7 KB
/
Copy pathgenGnuplot.py
File metadata and controls
executable file
·514 lines (477 loc) · 26.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
#!/usr/bin/python -O
import sys
workload = []
#workload += ['mcf_4']
workload += ['multi-prog_4']
workloadName = []
#workloadName += ['mcf']
workloadName += ['mix1']
figure = []
# --- total ---
figure += ['ipc']
figure += ['normalized_ipc']
figure += ['miss_rate']
figure += ['execution_time']
figure += ['throughput']
figure += ['latency']
# figure += ['queue_latency']
# figure += ['miss_latency']
# figure += ['hit_latency']
# # --- read ---
# figure += ['read_miss_rate']
# figure += ['read_throughput']
# figure += ['read_latency']
# figure += ['read_miss_latency']
# figure += ['read_hit_latency']
# # --- write ---
# figure += ['write_miss_rate']
# figure += ['write_throughput']
# figure += ['write_latency']
# figure += ['write_miss_latency']
# figure += ['write_hit_latency']
# --- power, energy ---
figure += ['power']
figure += ['normalized_power']
figure += ['dram_power']
figure += ['nv_power']
figure += ['energy']
figure += ['normalized_energy']
figure += ['dram_energy']
figure += ['nv_energy']
epoch_figure = []
# epoch_figure += ['working_set_size']
# === functions ===
# --- total ---
def ipc(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output '%s-ipc.eps'" %workload[0]
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"IPC\""
print "set xtics nomirror (64, 128, 256, 512, 1024, 2048)"
print "set ytics nomirror"
print "set log x"
print "plot \"%s.ptlsim.dat\" using 1:2 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
# print "plot \"%s.ptlsim.dat\" using 1:2 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
# print "\"%s.ptlsim.dat\" using 1:2 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
def normalizedIpc(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output '%s-normalizedIpc.eps'" %workload[0]
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Normalized IPC\""
print "set xtics nomirror (64, 128, 256, 512, 1024, 2048)"
print "set ytics nomirror"
print "set log x"
print "plot \"%s.ptlsim.dat\" using 1:3 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
print "reset"
return
def missRate(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output '%s-missRate.eps'" %workload[0]
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"DRAM Cache Miss Rate\""
print "set xtics nomirror (64, 128, 256, 512, 1024, 2048)"
print "set ytics nomirror"
print "set log x"
print "plot \"%s.hybridsim.dat\" using 1:2 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
# print "plot \"%s.hybridsim.dat\" using 1:2 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
# print "\"%s.hybridsim.dat\" using 1:2 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
def executionTime(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output '%s-executionTime.eps'" %workload[0]
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Execution Time (us)\""
print "set xtics nomirror (64, 128, 256, 512, 1024, 2048)"
print "set ytics nomirror"
print "set log x"
print "plot \"%s.hybridsim.dat\" using 1:3 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
# print "plot \"%s.hybridsim.dat\" using 1:3 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
# print "\"%s.hybridsim.dat\" using 1:3 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
def throughput(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output '%s-throughput.eps'" %workload[0]
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Throughput (KB/s)\""
print "set xtics nomirror (64, 128, 256, 512, 1024, 2048)"
print "set ytics nomirror"
print "set log x"
print "plot \"%s.hybridsim.dat\" using 1:4 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
# print "plot \"%s.hybridsim.dat\" using 1:4 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
# print "\"%s.hybridsim.dat\" using 1:4 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
def latency(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output '%s-latency.eps'" %workload[0]
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Average Memory Latency (us)\""
print "set xtics nomirror (64, 128, 256, 512, 1024, 2048)"
print "set ytics nomirror"
print "set log x"
print "plot \"%s.hybridsim.dat\" using 1:5 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
# print "plot \"%s.hybridsim.dat\" using 1:5 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
# print "\"%s.hybridsim.dat\" using 1:5 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
def queueLatency(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output 'queueLatency.eps'"
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Average Queue Latency (us)\""
print "set xtics nomirror (16, 32, 64, 128, 256, 512, 1024)"
print "set ytics nomirror"
print "set log x"
# print "plot \"%s.hybridsim.txt\" using 1:6 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
print "plot \"%s.hybridsim.dat\" using 1:6 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
print "\"%s.hybridsim.dat\" using 1:6 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
def missLatency(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output 'missLatency.eps'"
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Average Memory Miss Latency (us)\""
print "set xtics nomirror (16, 32, 64, 128, 256, 512, 1024)"
print "set ytics nomirror"
print "set log x"
# print "plot \"%s.hybridsim.txt\" using 1:7 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
print "plot \"%s.hybridsim.dat\" using 1:7 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
print "\"%s.hybridsim.dat\" using 1:7 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
def hitLatency(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output 'hitLatency.eps'"
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Average Memory Hit Latency (us)\""
print "set xtics nomirror (16, 32, 64, 128, 256, 512, 1024)"
print "set ytics nomirror"
print "set log x"
# print "plot \"%s.hybridsim.txt\" using 1:8 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
print "plot \"%s.hybridsim.dat\" using 1:8 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
print "\"%s.hybridsim.dat\" using 1:8 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
# --- read ---
def readMissRate(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output 'readMissRate.eps'"
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"DRAM Cache Read Miss Rate\""
print "set xtics nomirror (16, 32, 64, 128, 256, 512, 1024)"
print "set ytics nomirror"
print "set log x"
# print "plot \"%s.hybridsim.txt\" using 1:9 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
print "plot \"%s.hybridsim.dat\" using 1:9 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
print "\"%s.hybridsim.dat\" using 1:9 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
def readThroughput(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output 'readThroughput.eps'"
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Read Throughput (KB/s)\""
print "set xtics nomirror (16, 32, 64, 128, 256, 512, 1024)"
print "set ytics nomirror"
print "set log x"
# print "plot \"%s.hybridsim.txt\" using 1:10 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
print "plot \"%s.hybridsim.dat\" using 1:10 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
print "\"%s.hybridsim.dat\" using 1:10 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
def readLatency(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output 'readLatency.eps'"
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Average Read Latency (us)\""
print "set xtics nomirror (16, 32, 64, 128, 256, 512, 1024)"
print "set ytics nomirror"
print "set log x"
# print "plot \"%s.hybridsim.txt\" using 1:11 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
print "plot \"%s.hybridsim.dat\" using 1:11 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
print "\"%s.hybridsim.dat\" using 1:11 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
def readMissLatency(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output 'readMissLatency.eps'"
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Average Read Miss Latency (us)\""
print "set xtics nomirror (16, 32, 64, 128, 256, 512, 1024)"
print "set ytics nomirror"
print "set log x"
# print "plot \"%s.hybridsim.txt\" using 1:12 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
print "plot \"%s.hybridsim.dat\" using 1:12 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
print "\"%s.hybridsim.dat\" using 1:12 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
def readHitLatency(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output 'readHitLatency.eps'"
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Average Read Hit Latency (us)\""
print "set xtics nomirror (16, 32, 64, 128, 256, 512, 1024)"
print "set ytics nomirror"
print "set log x"
# print "plot \"%s.hybridsim.txt\" using 1:13 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
print "plot \"%s.hybridsim.dat\" using 1:13 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
print "\"%s.hybridsim.dat\" using 1:13 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
# --- write ---
def writeMissRate(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output 'writeMissRate.eps'"
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"DRAM Cache Write Miss Rate\""
print "set xtics nomirror (16, 32, 64, 128, 256, 512, 1024)"
print "set ytics nomirror"
print "set log x"
# print "plot \"%s.hybridsim.txt\" using 1:14 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
print "plot \"%s.hybridsim.dat\" using 1:14 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
print "\"%s.hybridsim.dat\" using 1:14 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
def writeThroughput(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output 'writeThroughput.eps'"
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Write Throughput (KB/s)\""
print "set xtics nomirror (16, 32, 64, 128, 256, 512, 1024)"
print "set ytics nomirror"
print "set log x"
# print "plot \"%s.hybridsim.txt\" using 1:15 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
print "plot \"%s.hybridsim.dat\" using 1:15 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
print "\"%s.hybridsim.dat\" using 1:15 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
def writeLatency(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output 'writeLatency.eps'"
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Average Write Latency (us)\""
print "set xtics nomirror (16, 32, 64, 128, 256, 512, 1024)"
print "set ytics nomirror"
print "set log x"
# print "plot \"%s.hybridsim.txt\" using 1:16 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
print "plot \"%s.hybridsim.dat\" using 1:16 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
print "\"%s.hybridsim.dat\" using 1:16 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
def writeMissLatency(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output 'writeMissLatency.eps'"
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Average Write Miss Latency (us)\""
print "set xtics nomirror (16, 32, 64, 128, 256, 512, 1024)"
print "set ytics nomirror"
print "set log x"
# print "plot \"%s.hybridsim.txt\" using 1:17 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
print "plot \"%s.hybridsim.dat\" using 1:17 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
print "\"%s.hybridsim.dat\" using 1:17 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
def writeHitLatency(workload, workloadName):
print "set terminal postscript enhanced color eps 30"
print "set output 'writeHitLatency.eps'"
print "set key right Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Average Write Hit Latency (us)\""
print "set xtics nomirror (16, 32, 64, 128, 256, 512, 1024)"
print "set ytics nomirror"
print "set log x"
# print "plot \"%s.hybridsim.txt\" using 1:18 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
print "plot \"%s.hybridsim.dat\" using 1:18 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %(workload[0], workloadName[0])
print "\"%s.hybridsim.dat\" using 1:18 axis x1y1 title \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"red\"" %(workload[1], workloadName[1])
print "reset"
return
# --- epoch ---
def workingSetSize(item, itemName):
print "set terminal postscript enhanced color eps 15"
print "set output \'%s.workingSetSize.eps\'" %itemName
print "set key right Left reverse nobox"
print "set xlabel \"Epoch\""
print "set ylabel \"Working Set Size (MB)\""
print "set xtics nomirror"
print "set ytics nomirror"
print "plot \"%s.epoch.txt\" using 1:3 axis x1y1 title \"%s\" lc rgb \"blue\"" %(item, itemName)
print "reset"
return
# --- power, energy ---
def power(workload, workloadName):
print "set terminal postscript enhanced color eps 20"
print "set output '%s-power.eps'" %workload[0]
print "set key left Left reverse box"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Power (mW)\""
print "set xtics nomirror (64, 128, 256, 512, 1024, 2048)"
print "set ytics nomirror"
print "set log x"
print "plot \"%s.totalPower.dat\" using 1:6 axis x1y1 title \"total\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %workload[0]
print " \"%s.totalPower.dat\" using 1:8 axis x1y1 title \"dram\" w lp lt 2 lw 5 pt 7 lc rgb \"red\", \\" %workload[0]
print " \"%s.totalPower.dat\" using 1:9 axis x1y1 title \"nv\" w lp lt 3 lw 5 pt 8 lc rgb \"green\"" %workload[0]
print "reset"
return
def normalizedPower(workload, workloadName):
print "set terminal postscript enhanced color eps 20"
print "set output '%s-normalizedPower.eps'" %workload[0]
print "set key left Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Normalized Power\""
print "set xtics nomirror (64, 128, 256, 512, 1024, 2048)"
print "set ytics nomirror"
print "set log x"
print "plot \"%s.totalPower.dat\" using 1:7 axis x1y1 notitle \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
print "reset"
return
def dramPower(workload, workloadName):
print "set terminal postscript enhanced color eps 20"
print "set output '%s-dramPower.eps'" %workload[0]
print "set key left Left reverse box"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"DRAM Power (mW)\""
print "set xtics nomirror (64, 128, 256, 512, 1024, 2048)"
print "set ytics nomirror"
print "set log x"
print "plot \"%s.totalPower.dat\" using 1:8 axis x1y1 title \"average power\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %workload[0]
print " \"%s.totalPower.dat\" using 1:19 axis x1y1 title \"background power\" w lp lt 2 lw 5 pt 7 lc rgb \"red\", \\" %workload[0]
# print " \"%s.totalPower.dat\" using 1:20 axis x1y1 title \"act/pre power\" w lp lt 1 lw 5 pt 5 lc rgb \"green\", \\" %workload[0]
# print " \"%s.totalPower.dat\" using 1:21 axis x1y1 title \"burst power\" w lp lt 1 lw 5 pt 5 lc rgb \"orange\", \\" %workload[0]
# print " \"%s.totalPower.dat\" using 1:22 axis x1y1 title \"refresh power\" w lp lt 1 lw 5 pt 5 lc rgb \"purple\", \\" %workload[0]
print " \"%s.totalPower.dat\" using 1:23 axis x1y1 title \"dynamic power\" w lp lt 3 lw 5 pt 8 lc rgb \"green\"" %workload[0]
print "reset"
return
def nvPower(workload, workloadName):
print "set terminal postscript enhanced color eps 20"
print "set output '%s-nvPower.eps'" %workload[0]
print "set key left Left reverse box"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"NV Power (mW)\""
print "set xtics nomirror (64, 128, 256, 512, 1024, 2048)"
print "set ytics nomirror"
print "set log x"
print "plot \"%s.totalPower.dat\" using 1:9 axis x1y1 title \"average power\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %workload[0]
print " \"%s.totalPower.dat\" using 1:24 axis x1y1 title \"idle power\" w lp lt 2 lw 5 pt 7 lc rgb \"red\", \\" %workload[0]
# print " \"%s.totalPower.dat\" using 1:25 axis x1y1 title \"access power\" w lp lt 1 lw 5 pt 5 lc rgb \"green\", \\" %workload[0]
# print " \"%s.totalPower.dat\" using 1:26 axis x1y1 title \"erase power\" w lp lt 1 lw 5 pt 5 lc rgb \"orange\", \\" %workload[0]
print " \"%s.totalPower.dat\" using 1:27 axis x1y1 title \"dynamic power\" w lp lt 3 lw 5 pt 8 lc rgb \"green\"" %workload[0]
print "reset"
return
def energy(workload, workloadName):
print "set terminal postscript enhanced color eps 20"
print "set output '%s-energy.eps'" %workload[0]
print "set key left Left reverse box"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Energy (mJ)\""
print "set xtics nomirror (64, 128, 256, 512, 1024, 2048)"
print "set ytics nomirror"
print "set log x"
print "plot \"%s.totalPower.dat\" using 1:2 axis x1y1 title \"total\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %workload[0]
print " \"%s.totalPower.dat\" using 1:4 axis x1y1 title \"dram\" w lp lt 2 lw 5 pt 7 lc rgb \"red\", \\" %workload[0]
print " \"%s.totalPower.dat\" using 1:5 axis x1y1 title \"nv\" w lp lt 3 lw 5 pt 8 lc rgb \"green\"" %workload[0]
print "reset"
return
def normalizedEnergy(workload, workloadName):
print "set terminal postscript enhanced color eps 20"
print "set output '%s-normalizedEnergy.eps'" %workload[0]
print "set key left Left reverse nobox"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"Normalized Energy\""
print "set xtics nomirror (64, 128, 256, 512, 1024, 2048)"
print "set ytics nomirror"
print "set log x"
print "plot \"%s.totalPower.dat\" using 1:3 axis x1y1 notitle \"%s\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\"" %(workload[0], workloadName[0])
print "reset"
return
def dramEnergy(workload, workloadName):
print "set terminal postscript enhanced color eps 20"
print "set output '%s-dramEnergy.eps'" %workload[0]
print "set key left Left reverse box"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"DRAM Energy (mJ)\""
print "set xtics nomirror (64, 128, 256, 512, 1024, 2048)"
print "set ytics nomirror"
print "set log x"
print "plot \"%s.totalPower.dat\" using 1:4 axis x1y1 title \"total energy\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %workload[0]
print " \"%s.totalPower.dat\" using 1:10 axis x1y1 title \"background energy\" w lp lt 2 lw 5 pt 7 lc rgb \"red\", \\" %workload[0]
# print " \"%s.totalPower.dat\" using 1:11 axis x1y1 title \"act/pre energy\" w lp lt 1 lw 5 pt 5 lc rgb \"green\", \\" %workload[0]
# print " \"%s.totalPower.dat\" using 1:12 axis x1y1 title \"burst energy\" w lp lt 1 lw 5 pt 5 lc rgb \"orange\", \\" %workload[0]
# print " \"%s.totalPower.dat\" using 1:13 axis x1y1 title \"refresh energy\" w lp lt 1 lw 5 pt 5 lc rgb \"purple\", \\" %workload[0]
print " \"%s.totalPower.dat\" using 1:14 axis x1y1 title \"dynamic energy\" w lp lt 3 lw 5 pt 8 lc rgb \"green\"" %workload[0]
print "reset"
return
def nvEnergy(workload, workloadName):
print "set terminal postscript enhanced color eps 20"
print "set output '%s-nvEnergy.eps'" %workload[0]
print "set key left Left reverse box"
print "set xlabel \"DRAM Cache Size (MB)\""
print "set ylabel \"NV Energy (mJ)\""
print "set xtics nomirror (64, 128, 256, 512, 1024, 2048)"
print "set ytics nomirror"
print "set log x"
print "plot \"%s.totalPower.dat\" using 1:5 axis x1y1 title \"total energy\" w lp lt 1 lw 5 pt 5 lc rgb \"blue\", \\" %workload[0]
print " \"%s.totalPower.dat\" using 1:15 axis x1y1 title \"idle energy\" w lp lt 2 lw 5 pt 7 lc rgb \"red\", \\" %workload[0]
# print " \"%s.totalPower.dat\" using 1:16 axis x1y1 title \"access energy\" w lp lt 1 lw 5 pt 5 lc rgb \"green\", \\" %workload[0]
# print " \"%s.totalPower.dat\" using 1:17 axis x1y1 title \"erase energy\" w lp lt 1 lw 5 pt 5 lc rgb \"orange\", \\" %workload[0]
print " \"%s.totalPower.dat\" using 1:18 axis x1y1 title \"dynamic energy\" w lp lt 3 lw 5 pt 8 lc rgb \"green\"" %workload[0]
print "reset"
return
# === main ===
for fig in figure:
# --- total ---
if fig == 'ipc': ipc(workload, workloadName)
elif fig == 'normalized_ipc': normalizedIpc(workload, workloadName)
elif fig == 'miss_rate': missRate(workload, workloadName)
elif fig == 'execution_time': executionTime(workload, workloadName)
elif fig == 'throughput': throughput(workload, workloadName)
elif fig == 'latency': latency(workload, workloadName)
elif fig == 'queue_latency': queueLatency(workload, workloadName)
elif fig == 'miss_latency': missLatency(workload, workloadName)
elif fig == 'hit_latency': hitLatency(workload, workloadName)
# --- read ---
elif fig == 'read_miss_rate': readMissRate(workload, workloadName)
elif fig == 'read_throughput': readThroughput(workload, workloadName)
elif fig == 'read_latency': readLatency(workload, workloadName)
elif fig == 'read_miss_latency': readMissLatency(workload, workloadName)
elif fig == 'read_hit_latency': readHitLatency(workload, workloadName)
# --- write ---
elif fig == 'write_miss_rate': writeMissRate(workload, workloadName)
elif fig == 'write_throughput': writeThroughput(workload, workloadName)
elif fig == 'write_latency': writeLatency(workload, workloadName)
elif fig == 'write_miss_latency': writeMissLatency(workload, workloadName)
elif fig == 'write_hit_latency': writeHitLatency(workload, workloadName)
# --- power, energy ---
elif fig == 'power': power(workload, workloadName)
elif fig == 'normalized_power': normalizedPower(workload, workloadName)
elif fig == 'dram_power': dramPower(workload, workloadName)
elif fig == 'nv_power': nvPower(workload, workloadName)
elif fig == 'energy': energy(workload, workloadName)
elif fig == 'normalized_energy': normalizedEnergy(workload, workloadName)
elif fig == 'dram_energy': dramEnergy(workload, workloadName)
elif fig == 'nv_energy': nvEnergy(workload, workloadName)
for epoch_fig in epoch_figure:
if epoch_fig == 'working_set_size': workingSetSize(workload[0], workloadName[0])
if epoch_fig == 'working_set_size': workingSetSize(workload[1], workloadName[1])