Optimizing program by reusing execution result of subclass test function
First Claim
1. A method for optimizing a program, comprising:
- determining reusability of code called by a function call of a subclass test function included in an execution-target program, on the basis of whether or not access to a global memory within said code includes only access for reading out type information specified in said function call and information traceable from said type information;
storing an execution result of code determined to be reusable and specified information specified in said function call of said code in a storage device as profile information of said code, in association with type information actually accessed within said code;
reading out, in response to detection of said function call of the subclass test function that calls the code determined to be reusable, the profile information of said code from said storage device, and reusing said execution result of said profile information provided that the specified information of said profile information matches specified information specified in said detected function call; and
monitoring said type information associated with said execution result included in said profile information stored in said storage device, and prohibiting, in response to a change made to said type information, reuse of said execution result associated with said type information, wherein said prohibiting said reuse of the execution result includes deleting said profile information associated with said change made to said type information and inserting an instruction sequence that invalidates said reuse of said execution result,wherein a processor coupled to a memory device is configured to perform;
the determining, the storing, the reading out and the monitoring.
1 Assignment
0 Petitions
Accused Products
Abstract
A technique for optimizing a program by reusing an execution result of a subclass test function. It includes a reusability determining unit to determine reusability of code of a subclass test function based on whether access to a global memory includes only access for reading out type information specified in a function call, a profiling unit configured to store an execution result of code determined to be reusable and specified information in a storage device in association with actually accessed type information, a reuse processing unit configured to reuse, in response to detection of a function call for calling the code determined to be reusable, the execution result on condition that the pieces of specified information specified in the function calls match, and a monitoring unit configured to monitor the type information associated with the execution result and prohibit reuse of the execution result if the type information is changed.
-
Citations
13 Claims
-
1. A method for optimizing a program, comprising:
-
determining reusability of code called by a function call of a subclass test function included in an execution-target program, on the basis of whether or not access to a global memory within said code includes only access for reading out type information specified in said function call and information traceable from said type information; storing an execution result of code determined to be reusable and specified information specified in said function call of said code in a storage device as profile information of said code, in association with type information actually accessed within said code; reading out, in response to detection of said function call of the subclass test function that calls the code determined to be reusable, the profile information of said code from said storage device, and reusing said execution result of said profile information provided that the specified information of said profile information matches specified information specified in said detected function call; and monitoring said type information associated with said execution result included in said profile information stored in said storage device, and prohibiting, in response to a change made to said type information, reuse of said execution result associated with said type information, wherein said prohibiting said reuse of the execution result includes deleting said profile information associated with said change made to said type information and inserting an instruction sequence that invalidates said reuse of said execution result, wherein a processor coupled to a memory device is configured to perform;
the determining, the storing, the reading out and the monitoring. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
Specification