1. A method in a data processing system for using a hardware interrupt to drive dynamic binary code recompilation, the method comprising: a processor of the data processing system monitoring execution of a plurality of instructions in an original program code to detect a problematic unpredictable branch instruction among said plurality of instructions; the processor determining whether the problematic unpredictable branch instruction is tagged for dynamic optimization in the original program code by a compiler; responsive to detecting said problematic unpredictable branch instruction, the processor throwing a hardware interrupt to a dynamic interrupt handler only in response to determining the problematic unpredictable branch instruction is tagged for dynamic optimization; said dynamic interrupt handler determining whether a threshold for dynamic binary code recompilation is satisfied; responsive to determining that said threshold for dynamic binary code recompilation is satisfied, dynamically optimizing said plurality of instructions maintaining in a branch instruction address hash table respective information regarding mispredictions of each of multiple branch instructions among the plurality of instructions; and wherein said determining whether a threshold for dynamic binary recompilation is satisfied comprises determining whether a threshold for dynamic binary recompilation is satisfied based at least in part on said information regarding mispredictions on said branch instruction address hash table.