The performance of an executing computer program on a computer system is monitored
using latency sampling. The program has object code instructions and is executing
on the computer system. At intervals, the execution of the computer program is
interrupted including delivering a first interrupt. In response to at least a subset
of the first interrupts, a latency associated with a particular object code instruction
is identified, and the latency is stored in a first database. The particular object
code instruction is executed by the computer such that the program remains unmodified.