Method for JIT compiler to optimize repetitive synchronization
First Claim
1. In a just-in-time compiler of program code, the program code including a plurality of blocks of instructions and the program code, when executed, performing repetitive synchronization on a plurality of objects, a method of optimizing said repetitive synchronization, said method comprising the steps of:
- considering said program code to collect information about each block of said plurality of blocks;
analyzing said information to determine a set of synchronization operations that may be removed;
modifying the program code based on said set of synchronization operations that may be removed, where said modifying includes inserting a new synchronization operation where necessitated by removing synchronization operations in said set.
1 Assignment
0 Petitions
Accused Products
Abstract
Repetitive synchronization in program code is optimized through lock coarsening that is performed subject to a number of constraints. Using a forward pass over the program code followed by a backward pass, region extent bits may be determined that identify the points in the program where object locking can be coarsened. The program code may then be modified to realize coarsened locking regions determined based on the region extent bits. Alternatively, previously determined value numbers may provide much of the information collected by the two passes. In such a case, a single pass over the program code may locate features that limit lock coarsening opportunities. A set of synchronization operations that can be removed may then be determined and used when modifying the program code to coarsen locking regions.
46 Citations
25 Claims
-
1. In a just-in-time compiler of program code, the program code including a plurality of blocks of instructions and the program code, when executed, performing repetitive synchronization on a plurality of objects, a method of optimizing said repetitive synchronization, said method comprising the steps of:
-
considering said program code to collect information about each block of said plurality of blocks;
analyzing said information to determine a set of synchronization operations that may be removed;
modifying the program code based on said set of synchronization operations that may be removed, where said modifying includes inserting a new synchronization operation where necessitated by removing synchronization operations in said set. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23)
-
-
24. A just-in-time compiler of program code, said program code including a plurality of blocks of instructions and said program code, when executed, performing repetitive synchronization on a plurality of objects, said compiler operable to:
-
consider said program code to collect information about each block of said plurality of blocks;
analyze said information to determine a set of synchronization operations that may be removed;
modify said program code based on said set of synchronization operations that may be removed, where said modifying includes inserting a new synchronization operation where necessitated by removing synchronization operations in said set.
-
-
25. A computer readable medium containing computer-executable instructions which, when performed by a processor in a computer system, cause said computer system to:
-
consider a listing of program code, said program code including a plurality of blocks of instructions and said program code, when executed, performing repetitive synchronization on a plurality of objects, to collect information about each block of said plurality of blocks;
analyze said information to determine a set of synchronization operations that may be removed; and
modify said program code based on said set of synchronization operations that may be removed, where said modifying includes inserting a new synchronization operation where necessitated by removing synchronization operations in said set.
-
Specification