Adding functionality to existing code at exits
DCFirst Claim
Patent Images
1. A method implemented on one or more machines for adding functionality to existing object code, the method comprising:
- adding exit code to said existing object code, said existing object code includes a method having original byte code, said exit code is part of a profiling process;
adding a new entry in an exceptions data store for said existing object code, said new entry points to said exit code, said exceptions data store is an exception table for said method, said adding a new entry in said exceptions data store includes adding said new entry into said exception table for said method, said new entry indicates a range of indices corresponding to said original byte code, said new entry includes a reference to said exit code and said new entry indicates that said new entry pertains to multiple types of exceptions; and
performing said profiling process.
3 Assignments
Litigations
0 Petitions
Accused Products
Abstract
New code is added to existing object code in order to add new functionality. For example, a call to start a profiler function can be added at the beginning of a Java method and a call to stop the profiler function can be added at the exits of the Java method. A method may have many different exits. To insure that the profiler process is stopped regardless of which exit is performed, the byte code and exception table are modified.
70 Citations
71 Claims
-
1. A method implemented on one or more machines for adding functionality to existing object code, the method comprising:
-
adding exit code to said existing object code, said existing object code includes a method having original byte code, said exit code is part of a profiling process; adding a new entry in an exceptions data store for said existing object code, said new entry points to said exit code, said exceptions data store is an exception table for said method, said adding a new entry in said exceptions data store includes adding said new entry into said exception table for said method, said new entry indicates a range of indices corresponding to said original byte code, said new entry includes a reference to said exit code and said new entry indicates that said new entry pertains to multiple types of exceptions; and performing said profiling process. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)
-
-
22. A method implemented on one or more machines for adding functionality to existing object code, the method comprising:
-
adding new exit functionality to said existing object code, said existing object code includes a method having original byte code, said new exit functionality is part of a profiling process; creating a grouping of all or a portion of said existing object code; and associating said grouping of said existing object code with at least a portion of said new exit functionality that is to be performed if an exception occurs during execution of said grouping of said existing object code, said associating includes adding a new entry into an exception table for said method, said new entry indicates a range of indices corresponding to said original byte code, said new entry includes a reference to said new exit functionality and said new entry indicates that said new entry pertains to multiple types of exceptions. - View Dependent Claims (23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34)
-
-
35. One or more processor readable storage devices having processor readable code embodied on said processor readable storage devices, said processor readable code for programming one or more processors to perform a method comprising:
-
adding exit code to existing object code, said existing object code includes a method having original byte code, said exit code is part of a profiling process; and adding an entry in an exceptions data store pointing to said exit code, said exceptions data store is an exception table for said method, said entry indicates that said entry pertains to two or more types of exceptions, said adding an entry in said exceptions data store includes adding a new entry into said exception table for said method, said new entry indicates a range of indices corresponding to said original byte code, said new entry includes a reference to said exit code. - View Dependent Claims (36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46)
-
-
47. An apparatus, comprising:
-
one or more storage devices; and one or more processors in communication with said one or more storage devices, said one or more processors programmed to perform a method comprising; adding exit code to existing object code, said existing object code includes a method having original byte code, said exit code is part of a profiling process; and adding an entry in an exceptions data store pointing to said exit code, said exceptions data store is an exception table for said method, said adding an entry in said exceptions data store includes adding a new entry into said exception table for said method, said new entry indicates a range of indices corresponding to said original byte code, said new entry includes a reference to said exit code and said new entry indicates that said new entry pertains to multiple types of exceptions. - View Dependent Claims (48, 49, 50, 51, 52, 53, 54, 55)
-
-
56. One or more processor readable storage devices having processor readable code embodied on said processor readable storage devices, said processor readable code for programming one or more processors to perform a method comprising:
-
adding exit functionality to existing object code, said existing object code includes a method having original byte code, said exit functionality is part of a profiling process; creating a grouping of all or part of said existing object code; and associating said exit functionality as a clean up process for said all or part of said existing object code grouped together, said associating includes adding a new entry into said exception table for said method, said new entry indicates a range of indices corresponding to said original byte code, said new entry includes a reference to said exit functionality and said new entry indicates that said new entry pertains to multiple types of exceptions. - View Dependent Claims (57, 58, 59, 60, 61)
-
-
62. An apparatus, comprising:
-
one or more storage devices; and one or more processors in communication with said one or more storage devices, said one or more processors programmed to perform a method comprising; adding exit functionality to existing object code, said existing object code includes a method having original byte code, said exit functionality is part of a profiling process, creating a new grouping of all or part of said existing object code; and associating said exit functionality as a clean up process for said all or part of said existing object code grouped together, said creating a grouping and associating include adding a new entry into an exception table for said method, said new entry indicates a range of indices corresponding to said original byte code, said new entry includes a reference to said exit functionality and said new entry indicates that said new entry pertains to multiple types of exceptions. - View Dependent Claims (63, 64, 65, 66)
-
-
67. A method implemented on one or more machines for adding functionality to existing object code, the method comprising:
-
accessing said existing object code; and adding try and finally functionality to said existing object code, said adding try and finally functionality includes; adding new finalization code; adding new code that calls said new finalization code if no exceptions occur, adding a new exception handler, said new exception handler is performed if an otherwise unhandled exception occurs, said new exception handler calls said new finalization code, and adding a new entry in an exceptions table, said new entry includes a reference to a portion of said existing object code and a reference to said new exception handler, said new entry indicates that said new entry pertains to multiple types of exceptions. - View Dependent Claims (68)
-
-
69. One or more processor readable storage devices having processor readable code embodied on said processor readable storage devices, said processor readable code for programming one or more processors to perform a method comprising:
-
adding exit code to said existing object code, said existing object code includes a method having original byte code, said adding exit code includes adding start code to said existing object code, said adding start code includes adding new byte code to said method and adjusting indices for said original byte code, said new byte code is positioned to be executed prior to said original byte code, said start code starts a profiling process, said exit code stops a profiling process, said exit code is positioned to be executed subsequent to said original byte code, said adding exit code includes adding an instruction to jump to said exit code from said original byte code; and adding a new entry in an exceptions data store for said existing object code, said new entry points to said exit code, said exceptions data store is an exception table for said method, said adding a new entry in said exceptions data store includes adding said new entry into said exception table for said method, said new entry indicates a range of indices corresponding to said original byte code, said new entry includes a reference to said exit code and said new entry indicates that said new entry pertains to all types of exceptions. - View Dependent Claims (70, 71)
-
Specification