Saeed Ullah wrote: > Hello, > I want to know that how many times the CPU go and take data from the memory > during the execution of my C++ program . I will be very thankful if any one > share the code to do the mentioned task for me or any other useful help. > > > Saeed Ullah, > MS-IT, > NUST SEECS, > http://wisnet.niit.edu.pk/people/~saeed/
And I have already said that this is not possible. Intel VTune, which is as close to the hardware as you can get with software, can't even do what you want. The hardware itself doesn't support it. Software can't support what the hardware doesn't offer. At least not natively. There is a feature in modern OSes where it swaps pages out to disk. How the OS knows to load a page back into memory is that it flags the page as having no access. When a program goes to access that page, an exception occurs, the OS checks to see if that page is in swap before killing the program. If it is, it goes out, loads the page, and then resumes where the program left off. Doing something similar to accomplish your goal is WAY outside the scope of this group, it is only theoretical, you probably will have to write your own OS, programs running under this model would be painfully slow, and you would likely frequently blow away the L2 cache such that any measurements you take would be relatively useless. -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleSoft.com/MyTaskFocus/
