ruby: cleaned up ruby profilers

Cleaned up the ruby profilers by moving the memory controller profiling code
out of the main profiler object and into a separate object similar to the
current CacheProfiler.  Both the CacheProfiler and MemCntrlProfiler are
specific to a particular Ruby object, CacheMemory and MemoryControl
respectively.  Therefore, these profilers should not be SimObjects and
created by the python configuration system, but instead private objects.  This
simplifies the creation of these profilers.
This commit is contained in:
Brad Beckmann
2010-01-29 20:29:22 -08:00
parent cfe41d0a1b
commit f88faa6c11
14 changed files with 356 additions and 302 deletions

View File

@@ -74,14 +74,9 @@ def create_system(options, phys_mem, piobus, dma_devices):
#
# First create the Ruby objects associated with this cpu
#
l1i_profiler = CacheProfiler(description = ("l1i_%s_profiler" % i))
l1i_cache = L1Cache(cache_profiler = l1i_profiler)
l1d_profiler = CacheProfiler(description = ("l1d_%s_profiler" % i))
l1d_cache = L1Cache(cache_profiler = l1d_profiler)
l2_profiler = CacheProfiler(description = ("l2_%s_profiler" % i))
l2_cache = L2Cache(cache_profiler = l2_profiler)
l1i_cache = L1Cache()
l1d_cache = L1Cache()
l2_cache = L2Cache()
cpu_seq = RubySequencer(icache = l1i_cache,
dcache = l1d_cache,

View File

@@ -57,20 +57,7 @@ def create_system(options, physmem, piobus = None, dma_devices = []):
mem_size_mb = sum([int(dir_cntrl.directory.size_mb) \
for dir_cntrl in dir_cntrls])
#
# determine the number of memory controllers and other memory controller
# parameters for the profiler
#
mcCount = len(dir_cntrls)
banksPerRank = dir_cntrls[0].memBuffer.banks_per_rank
ranksPerDimm = dir_cntrls[0].memBuffer.ranks_per_dimm
dimmsPerChannel = dir_cntrls[0].memBuffer.dimms_per_channel
ruby_profiler = RubyProfiler(num_of_sequencers = len(cpu_sequencers),
mem_cntrl_count = mcCount,
banks_per_rank = banksPerRank,
ranks_per_dimm = ranksPerDimm,
dimms_per_channel = dimmsPerChannel)
ruby_profiler = RubyProfiler(num_of_sequencers = len(cpu_sequencers))
ruby = RubySystem(clock = options.clock,
network = network,