System and program product for implementing single threaded optimizations in a potentially multi-threaded environment
First Claim
Patent Images
1. An apparatus for implementing single threaded optimizations in a potentially multi-threaded environment, the apparatus comprising:
- at least one processor;
a memory coupled to the at least one processor and storing instructions for execution on the at least one processor, the instructions causing the at least one processor to;
examine program code for characteristics indicative of a potential to generate multiple threads, wherein the program code is examined dynamically as the program code is running to at least one of reduce a number of situations that prevent single threaded optimizations from being implemented, and delay correction of single threaded optimizations that have been implemented;
implement at least one single threaded optimization if the characteristics indicate that the program code does not have the potential to generate multiple threads; and
remove the at least one single threaded optimization if the program code is later revealed to have the potential to generate multiple threads.
0 Assignments
0 Petitions
Accused Products
Abstract
Under the present invention, program code is examined (statically or dynamically) for characteristics indicative of a potential to generate multiple threads. If none are found, single threaded optimization(s) such as desynchronization, optimization of globals, etc., can be implemented. In addition, if the program code is later revealed to have the potential to generate multiple threads, the single threaded optimization(s) can be corrected to avoid incorrect execution.
-
Citations
20 Claims
-
1. An apparatus for implementing single threaded optimizations in a potentially multi-threaded environment, the apparatus comprising:
-
at least one processor; a memory coupled to the at least one processor and storing instructions for execution on the at least one processor, the instructions causing the at least one processor to; examine program code for characteristics indicative of a potential to generate multiple threads, wherein the program code is examined dynamically as the program code is running to at least one of reduce a number of situations that prevent single threaded optimizations from being implemented, and delay correction of single threaded optimizations that have been implemented; implement at least one single threaded optimization if the characteristics indicate that the program code does not have the potential to generate multiple threads; and remove the at least one single threaded optimization if the program code is later revealed to have the potential to generate multiple threads. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer program product for implementing single threaded optimizations in a potentially multi-threaded environment, the computer program product comprising a non-transitory computer-readable storage medium having computer-usable program code embodied therein, the computer-usable program code comprising:
-
computer-usable program code to examine program code for characteristics indicative of a potential to generate multiple threads, wherein the program code is examined dynamically as the program code is running to at least one of reduce a number of situations that prevent single threaded optimizations from being implemented, and delay correction of single threaded optimizations that have been implemented; computer-usable program code to implement at least one single threaded optimization if the characteristics indicate that the program code does not have the potential to generate multiple threads; and computer-usable program code to remove the at least one single threaded optimization if the program code is later revealed to have the potential to generate multiple threads. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A system for implementing single threaded optimizations in a potentially multi-threaded environment, the system comprising:
-
a code examination system to examine program code for characteristics indicative of a potential to generate multiple threads, wherein the code examination system examines the program code dynamically as the program code is running to at least one of reduce a number of situations that prevent single threaded optimizations from being implemented, and delay correction of single threaded optimizations that have been implemented, wherein the code examination system comprises at least one hardware component; an optimization system to implement at least one single threaded optimization if the characteristics indicate that the program code does not have the potential to generate multiple threads; and a review system to remove the at least one single threaded optimization if the program code is later revealed to have the potential to generate multiple threads. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification