Method and system for compensating for instrumentation overhead in trace data by computing average minimum event times
First Claim
1. A method for processing trace data output in a data processing system, the method comprising the computer-implemented steps of:
- processing a set of trace event records in a trace file, wherein the event trace records record selected events during an execution of a profiled program;
representing the trace events as one or more nodes in a tree data structure;
recording one or more performance statistics at each node in the tree data structure;
processing the performance statistics at each node to determine an overhead compensation value; and
applying the overhead compensation value to the performance statistics at each node.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and system for compensating for instrumentation overhead in trace data by computing average minimum event times is provided. In order to profile a program, the program is executed to generate trace records that are written to a trace file. A set of trace event records are processed, and the trace events are represented as one or more nodes in a tree data structure. One or more performance statistics are stored at each node in the tree data structure, and a performance statistic at each node is processed to determine an overhead compensation value. The overhead compensation value is determined by computing a local overhead value for each node in the tree data structure. The total execution time of a routine corresponding to the event represented by the node is retrieved, and the local overhead value is computed as the average of the execution time over the number of calls to the routine and the number of calls from the routine to other routines. The minimum of all of the local overhead values is the maximum possible global value used as the overhead compensation value. The overhead compensation value is then applied to the performance statistic at each node.
200 Citations
19 Claims
-
1. A method for processing trace data output in a data processing system, the method comprising the computer-implemented steps of:
-
processing a set of trace event records in a trace file, wherein the event trace records record selected events during an execution of a profiled program;
representing the trace events as one or more nodes in a tree data structure;
recording one or more performance statistics at each node in the tree data structure;
processing the performance statistics at each node to determine an overhead compensation value; and
applying the overhead compensation value to the performance statistics at each node. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
for each node in the tree data structure, computing a local overhead value; and
determining the overhead compensation value as a minimum of all local overhead values.
-
-
3. The method of claim 2 wherein the computation of the local overhead value further comprises:
-
obtaining an execution time of a routine corresponding to the event represented by the node; and
computing the local overhead value as the average of the execution time over a number of calls to the routine and a number of calls from the routine to other routines.
-
-
4. The method of claim 3 further comprising:
saving a method name of the routine of the node associated with the determination of the overhead compensation value.
-
5. The method of claim 1 wherein the event trace records comprise a timestamp recording a time of occurrence of a selected event in a profiled program.
-
6. The method of claim 1 wherein the overhead compensation value is applied to a performance statistic at a node by adjusting an execution time of a routine corresponding to the event represented by the node.
-
7. The method of claim 1 wherein the overhead compensation value represents an amount of time for instrumentation processing of an event.
-
8. The method of claim 1 wherein the event trace records comprise method entry trace records and method exit trace records.
-
9. A data processing system for processing trace data output, the data processing system comprising:
-
first processing means for processing a set of trace event records in a trace file, wherein the event trace records record selected events during an execution of a profiled program;
representing means for representing the trace events as one or more nodes in a tree data structure;
recording means for recording one or more performance statistics at each node in the tree data structure;
second processing means for processing the performance statistics at each node to determine an overhead compensation value; and
applying means for applying the overhead compensation value to the performance statistics at each node. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
computing means for computing, for each node in the tree data structure, a local overhead value; and
determining means for determining the overhead compensation value as a minimum of all local overhead values.
-
-
11. The data processing system of claim 10 wherein the computing means for computing the local overhead value further comprises:
-
obtaining means for obtaining an execution time of a routine corresponding to the event represented by the node; and
averaging means for averaging the execution time over a number of calls to the routine and a number of calls from the routine to other routines to obtain the local overhead value.
-
-
12. The data processing system of claim 11 further comprising:
saving means for saving a method name of the routine of the node associated with the determination of the overhead compensation value.
-
13. The data processing system of claim 9 wherein the event trace records comprise a timestamp recording a time of occurrence of a selected event in a profiled program.
-
14. The data processing system of claim 9 wherein the applying means further comprises:
adjusting means for adjusting an execution time of a routine corresponding to the event represented by the node.
-
15. The data processing system of claim 9 wherein the overhead compensation value represents an amount of time for instrumentation processing of an event.
-
16. The data processing system of claim 9 wherein the event trace records comprise method entry trace records and method exit trace records.
-
17. A computer program product on a computer-readable medium for use in a data processing system for processing trace data output, the computer program product comprising:
-
first instructions for processing a set of trace event records in a trace file, wherein the event trace records record selected events during an execution of a profiled program;
second instructions for representing the trace events as one or more nodes in a tree data structure;
third instructions for recording one or more performance statistics at each node in the tree data structure;
fourth instructions for processing the performance statistics at each node to determine an overhead compensation value; and
fifth instructions for applying the overhead compensation value to the performance statistics at each node. - View Dependent Claims (18, 19)
instructions for computing, for each node in the tree data structure, a local overhead value; and
instructions for determining the overhead compensation value as a minimum of all local overhead values.
-
-
19. The computer program product of claim 18 wherein the instructions for computing the local overhead value further comprises:
-
instructions for obtaining an execution time of a routine corresponding to the event represented by the node; and
instructions for computing the local overhead value as the average of the execution time over a number of calls to the routine and a number of calls from the routine to other routines.
-
Specification