Hi all,

The classic memory system already tracks something called taskIds, see 
src/mem/request.hh. These are also used in the caches (see for example 
src/mem/cache/cache.cc) where there are a number of stats that track what task 
is occupying what portion of the cache etc. I don’t think Ruby uses these 
taskIds today, but I could be wrong.

The taskIds need to be attached to the request with information from the guest 
OS, and currently that is only implemented for ARM full-system. Have a look at 
src/arch/arm/linux/system.cc in particular. Something similar could likely be 
implemented for syscall-emulation and other ISAs as well.

Andreas

From: gem5-users 
<[email protected]<mailto:[email protected]>> on behalf of 
Jason Lowe-Power <[email protected]<mailto:[email protected]>>
Reply-To: gem5 users mailing list 
<[email protected]<mailto:[email protected]>>
Date: Thursday, 20 April 2017 at 15:31
To: gem5 users mailing list <[email protected]<mailto:[email protected]>>
Subject: Re: [gem5-users] monitor shared data in L2 cache

I'm not sure the best way to do this with the classic caches (i.e., 
src/mem/caches), but I can outline how to do it with Ruby. It will probably be 
similar if you're using the classic caches.

In Ruby, you would add some metadata to each cache line. For instance, you 
would modify the following line in MI_example: 
https://gem5.googlesource.com/public/gem5/+/master/src/mem/protocol/MI_example-cache.sm#82
 to add information to the "entry". Then, when you get an external hit to that, 
you would add a statistic that counts it. You can also add more information to 
the messages (e.g., ResponseMsg in MI_example 
https://gem5.googlesource.com/public/gem5/+/master/src/mem/protocol/MI_example-msg.sm#77)
 to track how the data moves around the caches.

For the classic caches it would be similar, but you'll have to dig into the 
cache code to figure out how to do it.

Jason

On Wed, Apr 19, 2017 at 10:47 AM xingyu li 
<[email protected]<mailto:[email protected]>> wrote:

Hello, list

I want to keep track of shared data in L2 cache in FS mode, which means a cache 
miss from one application finds the cache line already brought in another cache 
by either the same application or another application.

Can you give me some point about this?

Thanks for answers.

_______________________________________________
gem5-users mailing list
[email protected]<mailto:[email protected]>
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to