A set of computer code is profiled by breaking each code segment of the computer
code down into basic instructions. Thereafter, the set of computer code is executed.
As each code segment is executed, a log is updated to indicate execution of that
code segment. This is done for each executed code segment; thus, at the end of
execution, the log reflects all of the code segments that were executed, and how
many times each code segment was executed. Using the log, and a set of calibration
statistics, which specify how much processing time is consumed by each basic instruction,
an overall execution cost is derived for each executed code segment. The set of
overall execution costs for all of the executed code segments are incorporated
into an overall profile for the set of computer code.