Patent ID: 8051332

Claim:
A computer implemented method for instrumenting performance counters in a .NET application, comprising: loading an instrumentation configuration to determine one or more .NET application methods requiring performance counter instrumentation and one or more types of performance counter that are to be instrumented for each such .NET application method; locating a segment of Common Intermediate Language method body that is to be instrumented with said one or more types of performance counter; and modifying the segment of Common Intermediate Language method body to expose one or more types of performance counter, wherein said modifying step further comprises: inserting declarative instrumentation filtering code into said Common Intermediate Language 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.