summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:12 -0700
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:12 -0700
commit54d76f0ce5d721ad3b4de168db98054844e634cc (patch)
tree19b74bf031e5aa9ecae18b7a1a0d36b5e0fc466c /src/mem/ruby/system
parenta3b4b9b3e3f8a1462b34d758199312d33af4b0c7 (diff)
downloadgem5-54d76f0ce5d721ad3b4de168db98054844e634cc.tar.xz
ruby: Fixed L2 cache miss profiling
Fixed L2 cache miss profiling for the MOESI_CMP_token protocol
Diffstat (limited to 'src/mem/ruby/system')
-rw-r--r--src/mem/ruby/system/CacheMemory.cc15
-rw-r--r--src/mem/ruby/system/CacheMemory.hh5
2 files changed, 18 insertions, 2 deletions
diff --git a/src/mem/ruby/system/CacheMemory.cc b/src/mem/ruby/system/CacheMemory.cc
index c9de85961..9102d1963 100644
--- a/src/mem/ruby/system/CacheMemory.cc
+++ b/src/mem/ruby/system/CacheMemory.cc
@@ -375,8 +375,19 @@ CacheMemory::setMRU(const Address& address)
void
CacheMemory::profileMiss(const CacheMsg& msg)
{
- m_profiler_ptr->addStatSample(msg.getType(), msg.getAccessMode(),
- msg.getSize(), msg.getPrefetch());
+ m_profiler_ptr->addCacheStatSample(msg.getType(),
+ msg.getAccessMode(),
+ msg.getPrefetch());
+}
+
+void
+CacheMemory::profileGenericRequest(GenericRequestType requestType,
+ AccessModeType accessType,
+ PrefetchBit pfBit)
+{
+ m_profiler_ptr->addGenericStatSample(requestType,
+ accessType,
+ pfBit);
}
void
diff --git a/src/mem/ruby/system/CacheMemory.hh b/src/mem/ruby/system/CacheMemory.hh
index f004b8310..c1d49f784 100644
--- a/src/mem/ruby/system/CacheMemory.hh
+++ b/src/mem/ruby/system/CacheMemory.hh
@@ -37,6 +37,7 @@
#include "mem/protocol/AccessPermission.hh"
#include "mem/protocol/CacheMsg.hh"
#include "mem/protocol/CacheRequestType.hh"
+#include "mem/protocol/GenericRequestType.hh"
#include "mem/protocol/MachineType.hh"
#include "mem/ruby/common/Address.hh"
#include "mem/ruby/common/DataBlock.hh"
@@ -112,6 +113,10 @@ class CacheMemory : public SimObject
void profileMiss(const CacheMsg & msg);
+ void profileGenericRequest(GenericRequestType requestType,
+ AccessModeType accessType,
+ PrefetchBit pfBit);
+
void getMemoryValue(const Address& addr, char* value,
unsigned int size_in_bytes);
void setMemoryValue(const Address& addr, char* value,