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]> 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]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to