Method and system for reordering the instructions of a computer program to optimize its execution
First Claim
1. A method of reordering the instructions within an executable file to optimize execution thereof by a data processing system, said method comprising the steps of:
- recording, during execution of said instructions, trace information including address information;
selecting a subset of said instructions which are indicated by said trace information as being executed frequently;
moving each of said selected instructions from their original physical location to a new physical location at the end of the executable file; and
indicating in each one of said original physical locations said new physical location corresponding to said moved instruction.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and method are provided that allows the results of an instruction trace mechanism to globally restructure the instructions. The process reorders the instructions in an executable program, using an actual execution profile (or instruction address trace) for a selected workload, to improve utilization of the existing hardware architecture. The reordering of instructions is implemented at a global level (i.e., independent of procedure or other structural boundaries which maximizes speedup) running on various hardware platforms and adds the ability to preserve correctness and debuggability for reordered executables. An unconditional branch instruction is added at the memory locations where reordered instructions previously were stored. When a dynamic branch occurs, the program will attempt to access the instruction at the original address and the unconditional branch directs the program to the reordered location of the instruction and program integrity is maintained.
-
Citations
9 Claims
-
1. A method of reordering the instructions within an executable file to optimize execution thereof by a data processing system, said method comprising the steps of:
-
recording, during execution of said instructions, trace information including address information; selecting a subset of said instructions which are indicated by said trace information as being executed frequently; moving each of said selected instructions from their original physical location to a new physical location at the end of the executable file; and indicating in each one of said original physical locations said new physical location corresponding to said moved instruction. - View Dependent Claims (2, 3)
-
-
4. An apparatus for reordering the instructions within an executable file to optimize execution thereof by a data processing system, said apparatus comprising:
-
means for recording, during execution of said instructions, trace information including address information; means for selecting a subset of said instructions which are indicated by said trace information as being executed frequently; and means for moving each of said selected instructions from their original physical location to a new physical location at the end of the executable file; and means for indicating in each one of said original physical locations said new physical location corresponding to said moved instruction. - View Dependent Claims (5, 6)
-
-
7. A computer program product comprising:
-
a computer usable medium having computer readable program code means embodied therein for reordering the instructions within an executable file to optimize execution thereof by a data processing system, said computer readable program code means comprising; means for recording, during execution of said instructions, trace information including address information; means for selecting a subset of said instructions which are indicated by said trace information as being executed frequently; and means for moving each of said selected instructions from their original physical location to a new physical location at the end of the executable file; and means for indicating in each one of said original physical locations said new physical location corresponding to said moved instruction. - View Dependent Claims (8, 9)
-
Specification