Re: [Gems-users] counting number of hits and misses


Date: Sun, 12 Mar 2006 19:16:49 -0600
From: "Min Xu (Hsu)" <xu@xxxxxxxxxxx>
Subject: Re: [Gems-users] counting number of hits and misses
Rishi,

I don't think getRubyMemoryValue/setRubyMemoryValue are called
unless in TM protocols. Perhaps an alternative way that works
in all protocols is to find where the cache misses are counted
(aggregated, not per-processor) and then change the code to
take an extra processor ID.

-Min

On Sun, 12 Mar 2006 Rishi Jain wrote :
> Hi,
> We are trying to modify the GEMS simulator for CMP protocol. We want to
> keep track of hits and misses to the L2 cache on a per-processor basis.
> We are thinking of adding required methods in ruby/system/CacheMemory.h,
> which would be called by ruby/system/Sequencer.C in getRubyMemoryValue and
> setRubyMemoryValue methods. We also plan to modify the Sequencer class to
> include a member for the processor_id.
> 
> 
> /* -------------------------------------------------------------- */
> bool Sequencer::getRubyMemoryValue(const Address& addr, char* value, unsigned int size_in_bytes ) {
> 	...
> 	...
> 	if (Protocol::m_CMP && n->L2_CACHE_MEMBER_VARIABLE->tryCacheAccess(lineAddr, CacheRequestType_LD, dataPtr)){
> 		<do something>
> 		n->L2_CACHE_MEMBER_VARIABLE->incrementNumHits(m_processor_id); // m_processor_id is a member of Sequencer object
> 	}
> 	...
> } // end getRubyMemoryValue
> /* -------------------------------------------------------------- */
> 
> There would be a similar code for tracking number of misses. Also, these
> two functions will be called from setRubyMemoryValue as well.
> 
> 
> I was wondering if we could get some opinion about this approach. Are we
> on the right track? And do we need something else besides this, to
> implement the functionality?
> 
> 
> thanks
> rishi
> 
> 
> _______________________________________________
> Gems-users mailing list
> Gems-users@xxxxxxxxxxx
> https://lists.cs.wisc.edu/mailman/listinfo/gems-users
[← Prev in Thread] Current Thread [Next in Thread→]