Two pass automated application instrumentation
First Claim
1. A machine-implemented method for instrumenting an application having a plurality of components, comprising:
- automatically statically analyzing the application to determine which of the components in the application to place probes in;
automatically statically adding probes in the determined components while the application is not running;
running the application after statically adding the probes;
receiving data from the statically added probes while the application runs;
determining metrics for a first of the statically added probes in a first of the components based on the data, the metrics comprising an execution time of the first component and an invocation rate of the first component;
moving the first statically added probe to a component in the application up a call graph from the first statically added probe when the invocation rate of the first component is greater than a first threshold;
moving the first statically added probe to a component in the application down the call graph when the invocation rate of the first component is less than a second threshold that is less than or equal to the first threshold;
moving the first statically added probe to a component in the application down the call graph when the execution time of the first component is greater than a third threshold providing that the invocation rate of the first component is not greater than the first threshold, wherein the moving the first statically added probe up or down the call graph comprises moving the first statically added probe while the application is running;
repeating, for additional statically added probes, the determining and the moving the additional probe up or down the call graph.
2 Assignments
0 Petitions
Accused Products
Abstract
A two-pass technique for instrumenting an application is disclosed. One pass may be performed statically by analyzing the application and inserting probes while the application is not running. Another pass may be performed dynamically by analyzing data collected by the probes while the application runs to derive metrics for the probes. One or more metrics for each probe may be analyzed to determine whether to dynamically modify the probe. By dynamically modifying the probe, the application does not need to be shut down. Dynamically modifying the probe could include removing the probe from the application or moving the probe to another component (e.g., method) in the application, as examples. For example, the probe might be moved to a component that is either up or down the call graph from the component that the probe is presently in.
54 Citations
11 Claims
-
1. A machine-implemented method for instrumenting an application having a plurality of components, comprising:
-
automatically statically analyzing the application to determine which of the components in the application to place probes in; automatically statically adding probes in the determined components while the application is not running; running the application after statically adding the probes; receiving data from the statically added probes while the application runs; determining metrics for a first of the statically added probes in a first of the components based on the data, the metrics comprising an execution time of the first component and an invocation rate of the first component; moving the first statically added probe to a component in the application up a call graph from the first statically added probe when the invocation rate of the first component is greater than a first threshold; moving the first statically added probe to a component in the application down the call graph when the invocation rate of the first component is less than a second threshold that is less than or equal to the first threshold; moving the first statically added probe to a component in the application down the call graph when the execution time of the first component is greater than a third threshold providing that the invocation rate of the first component is not greater than the first threshold, wherein the moving the first statically added probe up or down the call graph comprises moving the first statically added probe while the application is running; repeating, for additional statically added probes, the determining and the moving the additional probe up or down the call graph. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. Non-transitory computer readable storage having computer readable instructions stored thereon for programming a processor to:
-
statically analyze an application having a plurality of components to determine components in the application to place probes; statically add probes to the application in the determined components while the application is not running; execute the application after statically adding the probes; collect data by the statically added probes while the application runs; determine metrics for a first of the statically added probes in a first of the components based on the collected data, the metrics comprising an execution time of the first component and an invocation rate of the first component; move the first statically added probe to a component in the application up a call graph from the first statically added probe when the invocation rate of the first component is greater than a first threshold; move the first statically added probe to a component in the application down the call graph from the first component when the invocation rate of the first component is less than a second threshold that is less than or equal to the first threshold; move the first statically added probe to a component in the application down the call graph when the execution time of the first component is greater than a third threshold providing that the invocation rate of the first component is not greater than the first threshold, wherein the moving the first statically added probe up or down the call graph comprises moving the first statically added probe while the application is running; repeat, for additional statically added probes, the determining and the moving the additional probe to a component up or down the call graph. - View Dependent Claims (9)
-
-
10. A system having:
-
a processor; and computer readable storage coupled to the processor, the computer readable storage having computer readable instructions stored thereon, the computer readable instructions which, when executed on the processor, cause the processor to instrument an application having a plurality of components, the processor being configured to; a) automatically statically analyze the application to determine which of the components in the application to statically place probes in; b) automatically statically add probes to the application in the determined components while the application is not running; c) receive data from the statically added probes while the application runs; d) determine metrics for a first of the statically added probes in a first of the components based on the data, the metrics comprising an execution time of the first component and an invocation rate of the first component; e) move the first statically added probe to a component in the application up a call graph from the first statically added probe when the invocation rate of the first component is greater than a first threshold; f) move the first statically added probe to a component in the application down the call graph from the first component when the invocation rate of the first component is less than a second threshold that is less than or equal to the first threshold; g) move the first statically added probe to a component in the application down the call graph when the execution time of the first component is greater than a third threshold providing that the invocation rate of the first component is not greater than the first threshold, wherein the moving the first statically added probe up or down the call graph comprises moving the first statically added probe while the application is running; h) repeat said d) through said g) for additional statically added probes. - View Dependent Claims (11)
-
Specification