From f88faa6c11bbb5c5f95fe32ccffca73c7c4758c8 Mon Sep 17 00:00:00 2001 From: Brad Beckmann Date: Fri, 29 Jan 2010 20:29:22 -0800 Subject: 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. --- src/mem/ruby/profiler/CacheProfiler.cc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/mem/ruby/profiler/CacheProfiler.cc') diff --git a/src/mem/ruby/profiler/CacheProfiler.cc b/src/mem/ruby/profiler/CacheProfiler.cc index a01d68050..474506734 100644 --- a/src/mem/ruby/profiler/CacheProfiler.cc +++ b/src/mem/ruby/profiler/CacheProfiler.cc @@ -43,10 +43,9 @@ #include "mem/ruby/profiler/Profiler.hh" #include "mem/gems_common/Vector.hh" -CacheProfiler::CacheProfiler(const CacheProfilerParams* params) - : SimObject(params), m_requestSize(-1) +CacheProfiler::CacheProfiler(const string& description) { - m_description = params->description; + m_description = description; m_requestTypeVec_ptr = new Vector; m_requestTypeVec_ptr->setSize(int(CacheRequestType_NUM)); @@ -60,7 +59,7 @@ CacheProfiler::~CacheProfiler() void CacheProfiler::printStats(ostream& out) const { - out << m_description << " cache stats: " << endl; + out << "Cache Stats: " << m_description << endl; string description = " " + m_description; out << description << "_total_misses: " << m_misses << endl; @@ -140,9 +139,3 @@ void CacheProfiler::addStatSample(CacheRequestType requestType, AccessModeType t m_hw_prefetches++; } } - -CacheProfiler * -CacheProfilerParams::create() -{ - return new CacheProfiler(this); -} -- cgit v1.2.3