Patent ID: 7954094

Claim:
A computer-implemented method for improving runtime performance of executable program code when the program code is executed on a data-processing system, the method comprising the steps of, during execution of the program code: (a) collecting runtime program data representing aspects of runtime behavior of the program code and analyzing the runtime program data to identify runtime behavior of the program code; (b) responsive to identification of the runtime behavior of the program code, applying heuristic models to select at least one region of the program code for which application of a performance improvement algorithm is expected to improve runtime performance of the program code and, for each selected region, selecting at least one performance improvement algorithm from a plurality of performance improvement algorithms based on analysis of the runtime behavior of the region; and (c) responsive to selecting, for each selected region, at least one performance improvement algorithm from a plurality of performance improvement algorithms based on analysis of the runtime behavior of the selected region, recompiling each selected region according to the at least one selected performance improvement algorithm for that region to generate a corresponding recompiled region, and modifying the program code so that each subsequently executed invocation of each selected region becomes an invocation of the corresponding recompiled region so as to produce executable modified program code; wherein the method iterates continuously during execution of the program code by recursively returning to step (a) in response to completion of step (c) and applying step (a) to the modified program code.