Software instrumentation method and apparatus
First Claim
1. A method for instrumenting virtual-machine-executable software, the software including one or more objects, each object being defined by a class, each class being associated with a class-hierarchy location, the method comprising the steps of:
- (a) identifying at least one target class included within the software, the at least one target class being associated with a first class-hierarchy location and with a first class name;
(b) for each target class, adding instrumentation to the software according to at least one of the following steps;
(i) creating a new class, adding instrumentation to the new class, and assigning the new class to a class-hierarchy location adjacent to and above the first class-hierarchy location of the target class; and
(ii) creating a new class, adding instrumentation to the new class, and assigning the new class to a class-hierarchy location adjacent to and below the first class-hierarchy location of the target class, assigning the first class name to the new class and assigning a second class name to the target class; and
(iii) adding instrumentation to the target class without modifying bytecode within the target class;
(c) causing a virtual machine to process as the target class the class assigned the first class name.
24 Assignments
0 Petitions
Accused Products
Abstract
Methods and an apparatus for instrumenting object oriented software that do not require modification to existing source code or to executable files, nor do they require modification to any existing sequences of object resident instructions. Methods include the class interceptor, doppelganger and method hijacking software instrumentation techniques. The class interceptor technique intercepts and monitors the paths of execution associated with methods inherited by a target class. The class doppelganger technique intercepts and monitors the paths of execution entering a target class. The method hijacking technique creates and adds instrumented methods directly to a target class.
-
Citations
14 Claims
-
1. A method for instrumenting virtual-machine-executable software, the software including one or more objects, each object being defined by a class, each class being associated with a class-hierarchy location, the method comprising the steps of:
-
(a) identifying at least one target class included within the software, the at least one target class being associated with a first class-hierarchy location and with a first class name;
(b) for each target class, adding instrumentation to the software according to at least one of the following steps;
(i) creating a new class, adding instrumentation to the new class, and assigning the new class to a class-hierarchy location adjacent to and above the first class-hierarchy location of the target class; and
(ii) creating a new class, adding instrumentation to the new class, and assigning the new class to a class-hierarchy location adjacent to and below the first class-hierarchy location of the target class, assigning the first class name to the new class and assigning a second class name to the target class; and
(iii) adding instrumentation to the target class without modifying bytecode within the target class;
(c) causing a virtual machine to process as the target class the class assigned the first class name. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. An apparatus for instrumenting virtual-machine-executable software, the software including one or more objects, each object being defined by a class, each class being associated with a class-hierarchy location, the method comprising the steps of:
-
(a) a target class identifier that identifies at least one target class included within the software, the at least one target class being associated with a first class-hierarchy location and with a first class name;
(b) an instrumenter that for each target class, adds instrumentation to the software according to at least one of the following steps;
(i) creating a new class, adding instrumentation to the new class, and assigning the new class to a class-hierarchy location adjacent to and above the first class-hierarchy location of the target class; and
(ii) creating a new class, adding instrumentation to the new class, and assigning the new class to a class-hierarchy location adjacent to and below the first class-hierarchy location of the target class, assigning the first class name to the new class and assigning a second class name to the target class; and
(iii) adding instrumentation to the target class without modifying bytecode within the target class;
(c) a virtual machine for processing as the target class the class assigned the first class name.
-
-
14. An apparatus for identifying at least one class included within virtual-machine-executable software, the apparatus comprising:
-
a class query engine which receives as input a set of class attribute names and associated value descriptions; and
a class searcher that sequentially searches classes included in software and performs a predetermined action upon identifying a class that possesses a set of class attribute names and associated values that match the set of class attribute names and associated value descriptions.
-
Specification