When your program uses a load instruction to request a value from memory, it makes an explicit request of the memory system. Quantify does not report times associated for memory system activity for the following reasons.
If the data requested
is in the processor's memory cache, the request typically takes only one
or two cycles to complete. Depending on the data available in the cache,
however, the memory system itself may make additional requests to retrieve
or flush memory between cache memory and main memory and disk. To your
program, these requests appear to make the load instructions stall, since
they take longer than normal.
The cost of these implicit
operations varies with the memory system implementation. Retrieving data
from main memory (DRAM) into the cache typically takes tens of cycles.
Paging, that is, retrieving data from a file on disk or the swap space
into the main memory, can take several thousands of cycles. If the device
is remotely accessed through an NFS connection, this time depends on network
delays as well as remote service contention. For a few programs, the time
spent in paging and memory management dominates the computation.
It is difficult to gather
data about memory requests that trigger the additional paging requests
because these additional requests occur transparently to your program.
Critical memory references occur at different times, based not only on
the history of the program's memory usage, but on other processes including
the operating system from the time the system was booted.
Quantify'd programs differ from the original program in that additional memory references are introduced with the new object code Quantify inserted. This skews its memory system behavior.