The Windows NT Sampling Profiler (PROFILE.EXE) is an easy-to-use tool that records the number of times each function of an application is called during the course of its execution. This tool is included in the Platform SDK.
While the application runs, PROFILE samples its instruction pointer periodically, and records the value of the instruction pointer each time it takes a sample. When the application terminates, PROFILE looks up the recorded address values in the symbol files to determine the function names. Then PROFILE tabulates the results and writes them to the specified file.
The output file consists of three comma-separated fields. The first field contains the number of times a sample occurred in the function. The second field contains the name of the module containing that function and the third field contains the name of the function within the module, followed by its virtual address. In a verbose listing, each of these function entries is followed by a listing of the actual addresses that were sampled.