1. A machine-implemented method for profiling program code comprising: identifying a first set of the instructions for which profiling is desired; associating profiling events with each of the first set of instructions; receiving an indication that an instruction has been retired; determining whether the instruction is within the first set of instructions for which profiling is desired; and if the instruction is within the first set, then determining whether a designated event associated with the instruction has occurred or not occurred; and recording the occurrence or not occurrence of the event within a first storage device.