Method and apparatus for modular reordering of portions of a computer program based on profile data
First Claim
1. An apparatus comprising:
- at least one processor;
a memory coupled to the at least one processor;
a computer program residing in the memory, the computer program including at least one procedure within each of a plurality of modules;
profile data residing in the memory that represents the execution frequency of at least one procedure within at least one of the plurality of modules in the computer program;
a reordering mechanism residing in the memory and executed by the at least one processor, the reordering mechanism reordering a plurality of procedures within at least one of the plurality of modules based on a portion of the profile data corresponding to the plurality of procedures and reordering the plurality of modules based on a portion of the profile data corresponding to procedures within the plurality of modules.
1 Assignment
0 Petitions
Accused Products
Abstract
An apparatus and method reorder portions of a computer program in a way that achieves both enhanced performance and maintainability of the computer program. A global call graph is initially constructed that includes profile data. From the information in the global call graph, an intramodular call graph is generated for each module. Reordering techniques are used to reorder the procedures in each module according to the profile data in each intramodular call graph. An intermodular call graph is generated from the information in the global call graph. Reordering techniques are used to reorder the modules in the computer program. By reordering procedures within modules, then reordering the modules, enhanced performance is achieved without reordering procedures across module boundaries. Respecting module boundaries enhances the maintainability of the computer program by allowing a module to be replaced without adversely affecting the other modules while still providing many of the advantages of global procedure reordering.
-
Citations
42 Claims
-
1. An apparatus comprising:
-
at least one processor; a memory coupled to the at least one processor; a computer program residing in the memory, the computer program including at least one procedure within each of a plurality of modules; profile data residing in the memory that represents the execution frequency of at least one procedure within at least one of the plurality of modules in the computer program; a reordering mechanism residing in the memory and executed by the at least one processor, the reordering mechanism reordering a plurality of procedures within at least one of the plurality of modules based on a portion of the profile data corresponding to the plurality of procedures and reordering the plurality of modules based on a portion of the profile data corresponding to procedures within the plurality of modules. - View Dependent Claims (2, 3, 4, 5)
-
-
6. An apparatus comprising:
-
at least one processor; a memory coupled to the at least one processor; a computer program residing in the memory, the computer program including at least one procedure within each of a plurality of modules; profile data residing in the memory that represents the execution frequency of at least one procedure within at least one of the plurality of modules in the computer program; a reordering mechanism residing in the memory and executed by the at least one processor, the reordering mechanism generating an intramodular call graph from the profile data for a selected one of the plurality of modules in the computer program and reordering the procedures within the selected module based on the profile data within the intramodular call graph. - View Dependent Claims (7, 8)
-
-
9. An apparatus comprising:
-
at least one processor; a memory coupled to the at least one processor; a computer program residing in the memory, the computer program including at least one procedure within each of a plurality of modules; profile data residing in the memory that represents the execution frequency of at least one procedure within at least one of the plurality of modules in the computer program; a reordering mechanism residing in the memory and executed by the at least one processor, the reordering mechanism generating an intermodular call graph from the profile data and reordering the plurality of modules based on the profile data within the intermodular call graph. - View Dependent Claims (10)
-
-
11. An apparatus comprising:
-
at least one processor; a memory coupled to the at least one processor; a computer program residing in the memory, the computer program including at least one procedure within each of a plurality of modules; a global call graph residing in the memory that represents the execution frequency of a plurality of procedures within at least one of the plurality of modules in the computer program; a reordering mechanism residing in the memory and executed by the at least one processor, the reordering mechanism comprising; a call graph partitioner, the call graph partitioner generating an intramodular call graph and an intermodular call graph from the global call graph; a procedure reordering mechanism, the procedure reordering mechanism reordering the plurality of procedures within a selected one of the plurality of modules based on profile data in the intramodular call graph that corresponds to the selected module; and a module reordering mechanism, the module reordering mechanism reordering the plurality of modules based on profile data within the intermodular call graph.
-
-
12. A method for improving execution speed of a computer program on a computer apparatus by reordering procedures and modules in the computer program according to profile data that represents the execution frequency of at least one procedure within at least one of a plurality of modules in the computer program, the computer program including at least one procedure within each of the plurality of modules, the method comprising the steps of:
-
reordering a plurality of procedures within at least one of the plurality of modules based on a portion of the profile data corresponding to the plurality of procedures; and reordering the plurality of modules based on a portion of the profile data corresponding to procedures within the plurality of modules. - View Dependent Claims (13, 14, 15, 16, 17)
-
-
18. A method for improving execution speed of a computer program on a computer apparatus by reordering procedures in the computer program according to profile data that represents the execution frequency of at least one procedure within at least one of a plurality of modules in the computer program, the computer program including at least one procedure within each of the plurality of modules, the method comprising the steps of:
-
generating an intramodular call graph from the profile data for a selected one of the plurality of modules in the computer program; and reordering the procedures within the selected module based on the profile data within the intramodular call graph. - View Dependent Claims (19, 20, 21, 22)
-
-
23. A method for improving execution speed of a computer program on a computer apparatus by reordering procedures in the computer program according to profile data that represents the execution frequency of at least one procedure within at least one of a plurality of modules in the computer program, the computer program including at least one procedure within each of the plurality of modules, the method comprising the steps of:
-
generating an intermodular call graph from the profile data; and reordering the plurality of modules based on the profile data within the intermodular call graph. - View Dependent Claims (24, 25)
-
-
26. A method for improving execution speed of a computer program on a computer apparatus by reordering procedures and modules in the computer program according to profile data, the computer program including at least one procedure within each of the plurality of modules, the method comprising the steps of:
-
generating a global call graph for the computer program from the profile data; generating an intramodular call graph from the global call graph for each of the plurality of modules in the computer program; reordering the procedures within each of the plurality of modules based on profile data within the corresponding intramodular call graph; generating an intermodular call graph from the global call graph; and reordering the plurality of modules based on profile data within the intermodular call graph.
-
-
27. A program product comprising:
-
(A) a reordering mechanism that reorders a plurality of procedures within at least one of a plurality of modules in a computer program based on profile data corresponding to the plurality of procedures and that reorders the plurality of modules based on profile data corresponding to procedures within the plurality of modules; and (B) signal bearing media bearing the reordering mechanism. - View Dependent Claims (28, 29, 30, 31, 32, 33)
-
-
34. A program product comprising:
-
(A) a reordering mechanism that generates an intramodular call graph from profile data for a selected one of the plurality of modules in a computer program and that reorders the procedures within the selected module based on the profile data within the intramodular call graph; and (B) signal bearing media bearing the reordering mechanism. - View Dependent Claims (35, 36, 37, 38)
-
-
39. A program product comprising:
-
(A) a reordering mechanism for generating an intermodular call graph from profile data relating to a computer program, the reordering mechanism reordering a plurality of modules within a computer program based on the profile data within the intermodular call graph; and (B) signal bearing media bearing the reordering mechanism. - View Dependent Claims (40, 41, 42)
-
Specification