Added support for branch target buffer stats.

This commit is contained in:
Ross Thompson 2023-03-02 22:16:30 -06:00
parent 3d1ffac7d7
commit 9bac643db2

View File

@ -156,7 +156,7 @@ def GeometricAverage(benchmarks, field):
return Product ** (1.0/index) return Product ** (1.0/index)
def ComputeGeometricAverage(benchmarks): def ComputeGeometricAverage(benchmarks):
fields = ['BDMR', 'BTMR', 'RASMPR', 'ClassMPR', 'ICacheMR', 'DCacheMR'] fields = ['BDMR', 'BTMR', 'RASMPR', 'ClassMPR', 'ICacheMR', 'DCacheMR', 'CPI']
AllAve = {} AllAve = {}
for field in fields: for field in fields:
Product = 1 Product = 1
@ -205,9 +205,9 @@ if(sys.argv[1] == '-b'):
for benchmark in benchmarkAll: for benchmark in benchmarkAll:
(name, opt, config, dataDict) = benchmark (name, opt, config, dataDict) = benchmark
if name+'_'+opt in benchmarkDict: if name+'_'+opt in benchmarkDict:
benchmarkDict[name+'_'+opt].append((config, dataDict['BDMR'])) benchmarkDict[name+'_'+opt].append((config, dataDict['BTMR']))
else: else:
benchmarkDict[name+'_'+opt] = [(config, dataDict['BDMR'])] benchmarkDict[name+'_'+opt] = [(config, dataDict['BTMR'])]
size = len(benchmarkDict) size = len(benchmarkDict)
index = 1 index = 1
@ -272,7 +272,9 @@ if(sys.argv[1] == '-b'):
else: else:
# steps 1 and 2 # steps 1 and 2
benchmarks = ProcessFile(sys.argv[1]) benchmarks = ProcessFile(sys.argv[1])
ComputeAverage(benchmarks) print(benchmarks[0])
ComputeAll(benchmarks)
ComputeGeometricAverage(benchmarks)
# 3 process into useful data # 3 process into useful data
# cache hit rates # cache hit rates
# cache fill time # cache fill time
@ -280,7 +282,6 @@ else:
# hazard counts # hazard counts
# CPI # CPI
# instruction distribution # instruction distribution
ComputeAll(benchmarks)
for benchmark in benchmarks: for benchmark in benchmarks:
printStats(benchmark) printStats(benchmark)