Performance Validator has two main parts - the stub and the user interface.
The stub is typically injected into the target program and communicates with the Performance Validator user interface.
The stub is injected into the target program using the CreateProcess() or CreateRemoteThread() Win32 function. Communication between the stub and the user interface is via named pipes. There is no human readable data sent between the two parts of the program. Both the stub and the user interface are multi-threaded.
The stub walks the entire program image detecting the start of each source code line using PDB and/or MAP files.
Each function is checked to see if it can safely be hooked without corrupting the code for another line or function, or changing the function of the program. The line is hooked if possible, otherwise the user interface is informed of the function hook failure.
As your program executes, the hooks on each function record the performance data for the function and communicates this to the user interface. The user interface calculates statistics based on the performance data and provides a colour coded display for the user to inspect.