Re: [Gems-users] Is the Cache tag search behavior truely simulated in ruby cache?


Date: Mon, 10 May 2010 13:18:25 +0000
From: MaDafan <dafan_ma@xxxxxxxxxxx>
Subject: Re: [Gems-users] Is the Cache tag search behavior truely simulated in ruby cache?
I run several workloads in splash2, spec2000, and guess there is enough cache locality in them.



From: dafan_ma@xxxxxxxxxxx
To: gems-users@xxxxxxxxxxx
Date: Mon, 10 May 2010 13:01:16 +0000
Subject: [Gems-users] Is the Cache tag search behavior truely simulated in ruby cache?

Hi there,
To do some research works on the cache replacement strategy in ruby cache, I choose several protocol for simulation, and I use the Cachememory::findTaginSet to profile the miss and hit in Cache rather than profile them in Slicc file, but I find the function “findTaginSet” always returning value "-1" which means no tag matching in sets.I'm confused so I add a line in Cachememory.h:

template<class ENTRY>
inline
int CacheMemory<ENTRY>::findTagInSet(Index cacheSet, const Address& tag) const
{
  assert(tag == line_address(tag));
  // search the set for the tags
  for (int i=0; i < m_cache_assoc; i++) {
    if ((m_cache[cacheSet][i].m_Address == tag) &&
        (m_cache[cacheSet][i].m_Permission != AccessPermission_NotPresent)) {
      return i;
   cout<<"L2 hit!"<<i<<endl;
&am! p;nb! sp;   }
  }
  return -1; // Not found
}

but nothing shows on the screen, so I wonder is the function a dummy one, actually no real address tag is stored in ruby cache, and the ruby can only profile miss and hit depending on the state, is it the case?
Thx !


使用Messenger保护盾2.0,支持多账号登录! 现在就下载!

使用新一代 Windows Live Messenger 轻松交流和共享! 立刻下载!
[← Prev in Thread] Current Thread [Next in Thread→]