From 611f052e963b06b4a7e02b2fc6d847cd6d08d038 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Sat, 19 Mar 2011 18:34:59 -0500 Subject: Ruby: Convert CacheRequestType to RubyRequestType This patch converts CacheRequestType to RubyRequestType so that both the protocol dependent and independent code makes use of the same request type. --- src/mem/ruby/profiler/CacheProfiler.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 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 fcad227fb..fdb4581bb 100644 --- a/src/mem/ruby/profiler/CacheProfiler.cc +++ b/src/mem/ruby/profiler/CacheProfiler.cc @@ -33,7 +33,7 @@ using namespace std; CacheProfiler::CacheProfiler(const string& description) - : m_cacheRequestType(int(CacheRequestType_NUM)), m_genericRequestType(int(GenericRequestType_NUM)) + : m_cacheRequestType(int(RubyRequestType_NUM)), m_genericRequestType(int(GenericRequestType_NUM)) { m_description = description; @@ -59,7 +59,7 @@ CacheProfiler::printStats(ostream& out) const int requests = 0; - for (int i = 0; i < int(CacheRequestType_NUM); i++) { + for (int i = 0; i < int(RubyRequestType_NUM); i++) { requests += m_cacheRequestType[i]; } @@ -70,10 +70,10 @@ CacheProfiler::printStats(ostream& out) const assert(m_misses == requests); if (requests > 0) { - for (int i = 0; i < int(CacheRequestType_NUM); i++) { + for (int i = 0; i < int(RubyRequestType_NUM); i++) { if (m_cacheRequestType[i] > 0) { out << description << "_request_type_" - << CacheRequestType_to_string(CacheRequestType(i)) + << RubyRequestType_to_string(RubyRequestType(i)) << ": " << 100.0 * (double)m_cacheRequestType[i] / (double)requests @@ -111,7 +111,7 @@ CacheProfiler::printStats(ostream& out) const void CacheProfiler::clearStats() { - for (int i = 0; i < int(CacheRequestType_NUM); i++) { + for (int i = 0; i < int(RubyRequestType_NUM); i++) { m_cacheRequestType[i] = 0; } for (int i = 0; i < int(GenericRequestType_NUM); i++) { @@ -128,7 +128,7 @@ CacheProfiler::clearStats() } void -CacheProfiler::addCacheStatSample(CacheRequestType requestType, +CacheProfiler::addCacheStatSample(RubyRequestType requestType, RubyAccessMode accessType, PrefetchBit pfBit) { -- cgit v1.2.3