Understanding Sampling Data Values in Profiling Tools
The sampling profiling method of the Visual Studio Team System Developer Edition Profiling Tools interrupts the computer processor at regular intervals and collects the function call stack. A call stack is a dynamic structure that stores information about the functions that are executing on the processor.
The profiler analysis determines whether the processor is executing code in the target process. If the processor was not executing code in the target process, the sample is discarded.
If the processor was executing the target code, the profiler increments the sample counts for each function on the call stack. At the time that the sample is taken, only one function on the call stack is currently executing code; the other functions on the stack are parents in the hierarchy of function calls that are waiting for their children to return.
For the sample event, the profiler increments the exclusive sample count of the function currently executing its instructions; Because an exclusive sample is also part of the total (inclusive) samples of the function, the inclusive sample count of the currently active function is also incremented.
The profiler increments the inclusive sample count of all other functions on the call stack.