Patent ID: 7496908

Claim:
A method, in a data processing system, for optimizing runtime execution of a computer program, comprising: modifying performance profile data accumulated during a trace of a computer program execution to form annotated performance profile data, wherein the annotated performance profile data includes annotations based on the occurrence of one or more events during execution of the computer program, wherein the one or more events occur based on hardware counter values and on performance indicators associated with one or more portions of the computer program; obtaining code for the computer program; determining a manner for compiling the code to provide a plurality of optimizations to the runtime execution of the computer program based on the performance profile data and on the annotations of the annotated performance profile data, wherein the plurality of optimizations comprises an optimization to instruction paths of the computer program at branch points such that a contiguous execution of instructions within the computer program is achieved, and an optimization to storage of instructions or data in a cache so that portions of a cache line that is falsely shared are stored in the cache on different cache lines, wherein the optimization to instruction paths of the computer program at branch points such that a contiguous execution of instructions within the computer program is achieved comprises determining paths of execution that are followed more often than other paths of execution, and making a path that is executed more often at the branch contiguous with the branch instruction, and wherein the optimization to storage of instructions or data in a cache so that portions of a cache line that is falsely shared are stored in the cache on different cache lines comprises determining from the performance profile data that there is a problem with false cache line sharing in execution of the computer program, and arranging the instructions or data in memory in a manner that minimizes cache line sharing; presenting the plurality of optimizations to a programmer for selection using a graphical user interface; receiving one or more selected optimizations of the plurality of optimizations selected by the programmer; and compiling the code using the one or more selected optimizations to generate an optimized computer program.