Exposing application performance counters for applications through code instrumentation
First Claim
1. A computer program product for implementing a computer implemented method for instrumenting performance counters in an application, the computer program product comprising one or more computer-readable storage devices having encoded thereon computer executable instructions which, when executed upon one or more processors within a computing system, perform the method for instrumenting performance counters in an application, the method comprising:
- loading an instrumentation configuration to determine one or more application methods requiring performance counter instrumentation and one or more types of performance counter that are to be instrumented for each such application method;
locating a segment of a method body that is to be instrumented with said one or more types of performance counter; and
modifying the segment of the method body to expose one or more types of performance counter, wherein said modifying step further comprises;
inserting declarative instrumentation filtering code into said method body, said declarative instrumentation filtering code comprising computer executable instructions configured to;
retrieve values from application method runtime parameters and class member variables;
calculate filtering expressions; and
determine if a method runtime context matches a filtering rule set associated with said one or more types of performance counters that are to be instrumented.
3 Assignments
0 Petitions
Accused Products
Abstract
Disclosed is a method for adding performance counters to an application after compilation of the application to Common Intermediate Language code without a requirement for code changes to the original application code or application recompilation from the development side. With regard to a further aspect of a particularly preferred embodiment, the invention may provide a method for adding the performance counters by declarative instrumentation of an application at runtime or compile time, without the need for an application developer to hardcode instrumentation logic into the application. An instrumentation configuration file provides declarative definition for performance counters that are to be added to a particular application, and particularly includes a complete list of performance counters that need to be added and settings for each performance counter.
-
Citations
20 Claims
-
1. A computer program product for implementing a computer implemented method for instrumenting performance counters in an application, the computer program product comprising one or more computer-readable storage devices having encoded thereon computer executable instructions which, when executed upon one or more processors within a computing system, perform the method for instrumenting performance counters in an application, the method comprising:
-
loading an instrumentation configuration to determine one or more application methods requiring performance counter instrumentation and one or more types of performance counter that are to be instrumented for each such application method; locating a segment of a method body that is to be instrumented with said one or more types of performance counter; and modifying the segment of the method body to expose one or more types of performance counter, wherein said modifying step further comprises; inserting declarative instrumentation filtering code into said method body, said declarative instrumentation filtering code comprising computer executable instructions configured to; retrieve values from application method runtime parameters and class member variables; calculate filtering expressions; and determine if a method runtime context matches a filtering rule set associated with said one or more types of performance counters that are to be instrumented. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer implemented method for instrumenting performance counters in an application, the method comprising:
-
loading an instrumentation configuration to determine one or more application methods requiring performance counter instrumentation and one or more types of performance counter that are to be instrumented for each such application method; locating a segment of a method body that is to be instrumented with said one or more types of performance counter; and modifying the segment of the method body to expose one or more types of performance counter, wherein said modifying step further comprises; inserting declarative instrumentation filtering code into said method body, said declarative instrumentation filtering code comprising computer executable instructions configured to; retrieve values from application method runtime parameters and class member variables; calculate filtering expressions; and determine if a method runtime context matches a filtering rule set associated with said one or more types of performance counters that are to be instrumented. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. A system for implementing a computer implemented method for instrumenting performance counters in an application, the system comprising one or more computer processors and computer memory having encoded thereon computer executable instructions which, when executed upon the one or more processors, perform the method for instrumenting performance counters in an application, the method comprising:
-
loading an instrumentation configuration to determine one or more application methods requiring performance counter instrumentation and one or more types of performance counter that are to be instrumented for each such application method; locating a segment of a method body that is to be instrumented with said one or more types of performance counter; and modifying the segment of the method body to expose one or more types of performance counter, wherein said modifying step further comprises; inserting declarative instrumentation filtering code into said method body, said declarative instrumentation filtering code comprising computer executable instructions configured to; retrieve values from application method runtime parameters and class member variables; calculate filtering expressions; and determine if a method runtime context matches a filtering rule set associated with said one or more types of performance counters that are to be instrumented. - View Dependent Claims (15, 16, 17, 18, 19, 20)
-
Specification