1. A system for monitoring a processor when it executes software code for a computer program, comprising: a register, operatively connected to the processor, that collects information regarding instructions executed by the processor; and a sampler, operatively connected to the register, that asynchronously from the operation of the processor, samples contents of the register.