Patent ID: 7185328

Claim:
A computer-implemented method for arranging atomic units of binary code of a program, an affinity between each atomic unit being described by edges in a weighted control flow graph representing the binary code, the computer-implemented method comprising: setting a threshold number of edges for assignment to partitions; assigning edges between atomic units of binary code; ranking each of the edges between atomic units by a weight to create a ranked edge list for the atomic units of binary code that is based on the weight, wherein the weight is based on the number of times that an execution control flows between the atomic units of binary code during an execution period; grouping the edges into partitions in accordance with the weight, wherein the weight is based on the number of times that an execution control flows between the atomic units of binary code during an execution period, wherein each partition is treated as an atomic unit; assigning edges between the partitions; ranking the edges between the partitions by a second weight to create a second ranked edge list, wherein ranking the edges between partitions by the second weight is based on the number of times that the execution control flows between the partitions during an execution period; determining whether the threshold number of edges have been assigned to each of the partitions; when the threshold number of edges have been assigned to each of the partitions, arranging the partitions in the binary code according to the second ranked edge list and accessing the partitions during the execution of the program; and when the threshold number of edges have not been assigned to each of the partitions, grouping the edges between the partitions into second partitions in accordance with the second weight, wherein the second weight is based on the number of times that an execution control flows between the second partitions during an execution period, wherein each second partition is treated as an atomic unit.