Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.
1689 Discussions

How can one monitor inside of a cache? and how degree can one control the content of it?

koyo
Beginner
86 Views
Hello folks,

I would like to monitor a transition of a content of a cache, i.e. which part of a RAM is in a cache at each time. If one can, please tell me which toolshould I use.

And also, I would like to know the name of function(s) to control it.

Free tool is appreciated, but commercial one could be acceptable. I use VC++, Windows XP or Seven.


Thank you.

P.S. Is there any good document, book or pointer?

0 Kudos
2 Replies
Thomas_W_Intel
Employee
86 Views
Koyo,

The Intel Performance Tuning Utility has some capability to monitor the cache usage. It is able to provide you some statistics on which cache lines were loaded or evicted.

You have influence the cache behaviour by software prefetching or streaming stores. These are special instructions that load data into the cache or write data to memory bypassing the cache, respectively. The easiest way to use them is by intrinsics_mm_prefetch and _mm_stream_pi.

For doing experiments with the processor cache, it is also sometimes insightful to disable the hardware prefetchers in the BIOS for doing experiments. (But don't forget to turn them on again to regain the performance :) ).

Kind regards
Thomas

koyo
Beginner
86 Views
To Thomas,

Thank you for your good brief tutorial and pointer.

Best Regards,
Koyo


Reply