1. A method in a data processing system for using a hardware interrupt to drive dynamic binary code recompilation: monitoring an execution of a plurality of instructions to detect a problematic instruction among said plurality of instructions; responsive to detecting said problematic instruction, throwing a hardware interrupt to a dynamic interrupt handler; said dynamic interrupt handler determining whether a threshold for dynamic binary code recompilation is satisfied; and responsive to determining that said threshold for dynamic binary code recompilation is satisfied, dynamically optimizing said plurality of instructions.