System and methods for optimizing compiled code according to code object participation in program activities
First Claim
1. In a system for operating computer programs, said programs comprising machine code having a plurality of procedures, a method for optimizing placement of procedures within a target program, the method comprising:
- (a) dividing execution of said target program into a plurality of activities which are based on operation of said target program by an end user, each of said activities requiring invocation of at least one procedure of said target program for completion of said each activity;
(b) for each of said activities, executing said target program and at completion of said each activity, storing profile information for indicating which procedures of said target program were invoked for completion of said each activity; and
(c) placing procedures which are invoked for a particular set of activities in contiguous locations of said target program, based on said profile information stored for each activity.
8 Assignments
0 Petitions
Accused Products
Abstract
A development system having a compiler, a linker, an interface, and a code packing optimization module is described. The compiler generates or "compiles" source listings into object modules, which may be linked or combined with other object modules (e.g., stored in "library" files) to create an executable program. The optimization module embodies activity-based methods for generating a profile bitmap for a program of interest, to identify related code objects (i.e., procedures, functions, routines, and the like) based on clustering of activity bit signatures, so that related ones may be packed together in the executable program. A run of a program to be optimized is divided into a plurality of activities, typically those which are core to the operation of the program. A profile bitmap of the program is generated by running the target program through the various activities: for each code object "hit" during an activity a corresponding bit is set. In this manner, a bit signature is generated for each code object indicating which activities the code object has participated in. These patterns are then ordered, for identifying code objects of the program which should be clustered together. Given this order, related procedures may be located in contiguous or near-contiguous pages of the program by ordering them based on their bitmap signatures. In this manner, the efficiency of information retrieval operations (e.g., disk access, caching, and the like) is maximized.
142 Citations
30 Claims
-
1. In a system for operating computer programs, said programs comprising machine code having a plurality of procedures, a method for optimizing placement of procedures within a target program, the method comprising:
-
(a) dividing execution of said target program into a plurality of activities which are based on operation of said target program by an end user, each of said activities requiring invocation of at least one procedure of said target program for completion of said each activity; (b) for each of said activities, executing said target program and at completion of said each activity, storing profile information for indicating which procedures of said target program were invoked for completion of said each activity; and (c) placing procedures which are invoked for a particular set of activities in contiguous locations of said target program, based on said profile information stored for each activity. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. In a development system for creating a computer program, said computer program comprising routines executable by a microprocessor, a method for optimizing ordering of said routines in the computer program, the method comprising:
-
(a) dividing the program into a plurality of discrete activities, each activity representing a particular task of the program which occurs during actual use of the program by a user; (b) for each activity, generating a corresponding bit set, each bit in the bit set representing whether a call has been made to a particular routine during execution of said each activity; (c) determining a bit signature for each activity, each bit in said bit signature identifying which particular routines of the program have been called during execution of said each activity; (d) generating an ordered list of all bit signatures, for identifying which particular routines of the program are related based on activity; and (e) ordering said routines in the computer program according to said ordered list. - View Dependent Claims (17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30)
-
Specification