Method and system for improving performance of applications that employ a cross-language interface
First Claim
1. A method for improving the execution performance of an application in a data processing system, wherein the application contains native code and non-native code supported by a cross-language boundary having methods for interfacing native code and non-native code, the method comprising:
- analyzing trace output data generated by instrumentation code in the application during the execution of the application;
detecting a call within a native method to a cross-language interface method that obtains an object reference to an object that is created by non-native code;
removing the call to the cross-language interface method from the native method;
modifying the native method to accept as an input argument an object reference to an object that is created by non-native code; and
modifying calls to the native method to pass as an input argument an object reference to an object that is created by non-native code.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, system, apparatus, and computer program product is presented for improving the execution performance of an application in a data processing system. Instrumentation code is inserted into an application in which the instrumentation code generates trace data for method entry events and method exit events when the instrumented application is executed. The trace output data that is generated by the instrumentation code is then analyzed to detect patterns which indicate an inefficient coding construct in the application. The source code for the inefficient coding construct in the application associated with the detected pattern may be modified according to indications provided to an application developer. For example, a specific inefficient coding construct may be an inefficient use of a cross-language boundary, such as the interface between Java code and native code, in which data is inefficiently transferred across the interface through a local array in the native code. A suggested transform for efficient use of a cross-language boundary may include the use of a reference to a Java object within the native code.
76 Citations
18 Claims
-
1. A method for improving the execution performance of an application in a data processing system, wherein the application contains native code and non-native code supported by a cross-language boundary having methods for interfacing native code and non-native code, the method comprising:
-
analyzing trace output data generated by instrumentation code in the application during the execution of the application;
detecting a call within a native method to a cross-language interface method that obtains an object reference to an object that is created by non-native code;
removing the call to the cross-language interface method from the native method;
modifying the native method to accept as an input argument an object reference to an object that is created by non-native code; and
modifying calls to the native method to pass as an input argument an object reference to an object that is created by non-native code. - View Dependent Claims (2, 3, 4)
-
-
5. A data processing system for improving the execution performance of an application, wherein the application contains native code and Java code supported by a cross-language boundary having methods for interfacing native code and Java code, wherein the data processing system includes a central processing unit (CPU) and a memory for storing data, the data processing system comprising:
-
means for analyzing trace output data generated by instrumentation code in the application during the execution of the application;
means for detecting a call within a native method to a cross-language interface method that obtains an object reference to an object that is created by non-native code;
means for removing the call to the cross-language interface method from the native method;
means for modifying the native method to accept as an input argument an object reference to an object that is created by non-native code; and
means for modifying calls to the native method to pass as an input argument an object reference to an object that is created by non-native code. - View Dependent Claims (6, 7, 8)
-
-
9. A computer program product in a computer-readable medium for use in a data processing system for improving the execution performance of an application, wherein the application contains native code and Java code supported by a cross-language boundary having methods for interfacing native code and Java code, the computer program product comprising:
-
instructions for analyzing trace output data generated by instrumentation code in the application during the execution of the application;
instructions for detecting a call within a native method to a cross-language interface method that obtains an object reference to an object that is created by non-native code;
instructions for removing the call to the cross-language interface method from the native method;
instructions for modifying the native method to accept as an input argument an object reference to an object that is created by non-native code; and
instructions for modifying calls to the native method to pass as an input argument an object reference to an object that is created by non-native code. - View Dependent Claims (10, 11, 12)
-
-
13. A method for improving the execution performance of an application in a data processing system, wherein the application contains native code and non-native code supported by a cross-language boundary having methods for interfacing native code and non-native code, the method comprising:
-
analyzing trace output data generated by instrumentation code in the application during the execution of the application;
detecting a native method that reads or writes data using calls to cross-language interface methods that copy data between a non-native buffer that is created by non-native code and a native buffer that is created by native code;
in response to detecting calls to cross-language interface methods that copy data between a non-native buffer and a native buffer, modifying the native method to obtain a reference to a non-native buffer using a cross-language interface method;
modifying the native method to read or write data using a cross-language interface method that uses the reference to the non-native buffer; and
modifying the native method to release the reference to the non-native buffer using a cross-language interface method. - View Dependent Claims (14)
-
-
15. A data processing system for improving the execution performance of an application, wherein the application contains native code and Java code supported by a cross-language boundary having methods for interfacing native code and Java code, wherein the data processing system includes a central processing unit (CPU) and a memory for storing data, the data processing system comprising:
-
means for analyzing trace output data generated by instrumentation code in the application during the execution of the application;
means for detecting a native method that reads or writes data using calls to cross-language interface methods that copy data between a non-native buffer that is created by non-native code and a native buffer that is created by native code;
means for modifying, in response to detecting calls to cross-language interface methods that copy data between a non-native buffer and a native buffer, the native method to obtain a reference to a non-native buffer using a cross-language interface method;
means for modifying the native method to read or write data using a cross-language interface method that uses the obtained reference to the non-native buffer; and
means for modifying the native method to release the obtained reference to the non-native buffer using a cross-language interface method. - View Dependent Claims (16)
-
-
17. A computer program product in a computer-readable medium for use in a data processing system for improving the execution performance of an application, wherein the application contains native code and Java code supported by a cross-language boundary having methods for interfacing native code and Java code, the computer program product comprising:
-
instructions for analyzing trace output data generated by instrumentation code in the application during the execution of the application;
instructions for detecting a native method that reads or writes data using calls to cross-language interface methods that copy data between a non-native buffer that is created by non-native code and a native buffer that is created by native code;
instructions for modifying, in response to detecting calls to cross-language interface methods that copy data between a non-native buffer and a native buffer, the native method to obtain a reference to a non-native buffer using a cross-language interface method;
instructions for modifying the native method to read or write data using a cross-language interface method that uses the obtained reference to the non-native buffer; and
instructions for modifying the native method to release the obtained reference to the non-native buffer using a cross-language interface method. - View Dependent Claims (18)
-
Specification