Patent ID: 8495427

Claim:
A method of detecting defects in deployed systems, comprising: identifying one or more monitoring agents used in a computer program; providing an interface comprising a plurality of operations for executing said one or more monitoring agents; collecting a total execution metric of the computer program and execution metric of said interface in executing the one or more monitoring agents; determining relative overhead incurred by said interface in executing the one or more monitoring agents based on said total execution metric of the computer program and the execution metric of said interface; comparing, using a processor, the determined relative overhead with one or more specified overhead criteria; and adjusting execution of the one or more monitoring agents based on the comparing step while the computer program is executing to meet the one or more specified overhead criteria, wherein said relative overhead is maintained separately for an origin for adjusting to be performed independently of other origins, wherein said identifying comprises at least identifying said one or more monitoring agents that have registered with a virtual machine via one or more of the operations of the interface during the startup of the virtual machine, and wherein during compilation of the computer program, the virtual machine queries said registered one or more monitoring agents via one or more of the operations of the interface to determine whether the computer program being compiled needs a form of instrumentation.