changeset e8fd0fc4a417 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=e8fd0fc4a417
description:
Ruby: Remove isTagPresent() calls from Sequencer.cc
This patch removes the calls to isTagPresent() from Sequencer.cc. These
calls are made just for setting the cache block to have been most
recently
used. The calls have been folded in to the function setMRU().
diffstat:
src/mem/ruby/system/CacheMemory.cc | 10 +++++-----
src/mem/ruby/system/Sequencer.cc | 6 ++----
2 files changed, 7 insertions(+), 9 deletions(-)
diffs (38 lines):
diff -r 38b8b9a97500 -r e8fd0fc4a417 src/mem/ruby/system/CacheMemory.cc
--- a/src/mem/ruby/system/CacheMemory.cc Fri Feb 10 11:05:24 2012 -0600
+++ b/src/mem/ruby/system/CacheMemory.cc Fri Feb 10 11:29:02 2012 -0600
@@ -339,12 +339,12 @@
void
CacheMemory::setMRU(const Address& address)
{
- Index cacheSet;
+ Index cacheSet = addressToCacheSet(address);
+ int loc = findTagInSet(cacheSet, address);
- cacheSet = addressToCacheSet(address);
- m_replacementPolicy_ptr->
- touch(cacheSet, findTagInSet(cacheSet, address),
- g_eventQueue_ptr->getTime());
+ if(loc != -1)
+ m_replacementPolicy_ptr->
+ touch(cacheSet, loc, g_eventQueue_ptr->getTime());
}
void
diff -r 38b8b9a97500 -r e8fd0fc4a417 src/mem/ruby/system/Sequencer.cc
--- a/src/mem/ruby/system/Sequencer.cc Fri Feb 10 11:05:24 2012 -0600
+++ b/src/mem/ruby/system/Sequencer.cc Fri Feb 10 11:29:02 2012 -0600
@@ -482,11 +482,9 @@
// Set this cache entry to the most recently used
if (type == RubyRequestType_IFETCH) {
- if (m_instCache_ptr->isTagPresent(request_line_address))
- m_instCache_ptr->setMRU(request_line_address);
+ m_instCache_ptr->setMRU(request_line_address);
} else {
- if (m_dataCache_ptr->isTagPresent(request_line_address))
- m_dataCache_ptr->setMRU(request_line_address);
+ m_dataCache_ptr->setMRU(request_line_address);
}
assert(g_eventQueue_ptr->getTime() >= issued_time);
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev