Patent ID: 7784042

Claim:
A machine implemented method for reordering a data section associated with a computer program, the method comprising: compiling the computer program into a plurality of object files that each include annotation information; linking the plurality of object files into a first binary file that includes the annotation information from each object file, wherein the data section of the computer program that is stored in the first binary file is not reordered; instrumenting the first binary file; executing the first binary file to collect profile information; based on the annotation information in the first binary file, generating at least one of control flow information and data flow information; based on at least one of the control flow information and the data flow information, determining for each data variable an access frequency for that data variable from each portion of the computer program; linking the plurality of object files into a specific binary file; reordering the data section of the computer program, wherein the reordering comprises: grouping data variables that are accessed with similar frequency from the same portion of the computer program, assigning contiguous virtual addresses to the grouped data variables, and setting all references to the grouped data variables in a code section of the computer program to reflect the assigned contiguous virtual addresses; and storing the specific binary file, after generating the first binary file, that is a specific executable version of the computer program, wherein the specific binary file includes the data section of the computer program that has been reordered, and wherein the specific executable version is different than the first executable version, wherein the reordering is based on at least the annotation information and the profile information.