Determining and compensating for temporal overhead in trace record generation and processing
First Claim
1. A method for determining temporal overhead in generating trace records in a data processing system, the method comprising the computer-implemented steps of:
- profiling a program with enablement of trace record generation during a first time period;
profiling a program with disablement of trace record generation during a second time period;
obtaining a number of trace records generated during the first time period;
calculating a trace overhead time value as a difference in length between the first time period and the second time period;
computing a trace overhead calibration value as an average time for writing the number of trace records output during the trace overhead time value; and
storing the output overhead calibration value for subsequent use in a profiling-related process in the data processing system.
1 Assignment
0 Petitions
Accused Products
Abstract
A program is profiled with enablement of trace record generation during a first period of time and with disablement of trace record generation during a second period of time. The number of trace records output during the first period of time is determined, and a trace overhead calibration value is computed as an average time for writing the number of trace records output during the first period of time. The trace overhead calibration value may be stored for subsequent use in a profiling-related process in the data processing system. The trace overhead compensation value represents the amount of time required to generate a trace record, and the trace times retrieved from the trace records are adjusted to compensate for the amount of time required to generate those trace records.
93 Citations
33 Claims
-
1. A method for determining temporal overhead in generating trace records in a data processing system, the method comprising the computer-implemented steps of:
-
profiling a program with enablement of trace record generation during a first time period;
profiling a program with disablement of trace record generation during a second time period;
obtaining a number of trace records generated during the first time period;
calculating a trace overhead time value as a difference in length between the first time period and the second time period;
computing a trace overhead calibration value as an average time for writing the number of trace records output during the trace overhead time value; and
storing the output overhead calibration value for subsequent use in a profiling-related process in the data processing system. - View Dependent Claims (2, 3)
retrieving a first start time;
executing the program during which trace records are generated;
retrieving a first end time; and
computing the first time period as a difference between the first start time and the first end time.
-
-
3. The method of claim 1, wherein the step of profiling a program with disablement of trace record generation during the second time period further comprises:
-
retrieving a second start time;
executing the program during which trace records are not generated;
retrieving a second end time; and
computing the second time period as a difference between the first start time and the first end time.
-
-
4. A method for processing trace data output in a data processing system, the method comprising the computer-implemented steps of:
-
reading a first timestamp from a first trace record and a second timestamp from a second trace record;
computing the difference between the two timestamps to obtain a delta time;
retrieving a trace overhead compensation value; and
adjusting the delta time by subtracting the trace overhead compensation value, wherein the trace overhead is determined by comparing a calibration run preceding a trace process. - View Dependent Claims (5, 6, 7, 8, 9, 10, 11)
computing an average amount of time to generate a trace record during the calibration run.
-
-
7. The method of claim 4 wherein the trace overhead compensation value is directly proportional to a time required to generate a trace record.
-
8. The method of claim 4 wherein the first trace record and the second trace record are output to a trace file during execution of a profiling process in the data processing system.
-
9. The method of claim 4 further comprising:
attributing the adjusted delta time to a routine whose execution caused the first trace record or the second trace record to be output.
-
10. The method of claim 4 further comprising:
adjusting the delta time using a plurality of trace overhead compensation values.
-
11. The method of claim 4 further comprising:
setting the adjusted delta time to zero if the adjusted delta time is negative.
-
12. A data processing system for determining temporal overhead in generating trace records in the data processing system, the data processing system comprising:
-
first profiling means for profiling a program with enablement of trace record generation during a first time period;
second profiling means for profiling a program with disablement of trace record generation during a second time period;
obtaining means for obtaining a number of trace records generated during the first time period;
calculating means for calculating a trace overhead time value as a difference in length between the first time period and the second time period;
first computing means for computing a trace overhead calibration value as an average time for writing the number of trace records output during the trace overhead time value; and
storing means for storing the output overhead calibration value for subsequent use in a profiling-related process in the data processing system. - View Dependent Claims (13, 14)
first retrieving means for retrieving a first start time;
first executing means for executing the program during which trace records are generated;
second retrieving means for retrieving a first end time; and
second computing means for computing the first time period as a difference between the first start time and the first end time.
-
-
14. The data processing system of claim 12, wherein the profiling means for profiling a program with disablement of trace record generation during the second time period further comprises:
-
third retrieving means for retrieving a second start time;
second executing means for executing the program during which trace records are not generated;
third retrieving means for retrieving a second end time; and
third computing means for computing the second time period as a difference between the first start time and the first end time.
-
-
15. A data processing system for processing trace data output in the data processing system, the data processing system comprising:
-
reading means for reading a first timestamp from a first trace record and a second timestamp from a second trace record;
first computing means for computing the difference between the two timestamps to obtain a delta time;
retrieving means for retrieving a trace overhead compensation value; and
first adjusting means for adjusting the delta time by subtracting the trace overhead compensation value, wherein the trace overhead is determined by comparing a calibration run preceding a trace process. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22)
second computing means for computing an average amount of time to generate a trace record during the calibration run.
-
-
18. The data processing system of claim 15 wherein the trace overhead compensation value is directly proportional to a time required to generate a trace record.
-
19. The data processing system of claim 15 wherein the first trace record and the second trace record are output to a trace file during execution of a profiling process in the data processing system.
-
20. The data processing system of claim 15 further comprising:
attributing means for attributing the adjusted delta time to a performance statistic for a routine whose execution caused the first trace record or the second trace record to be output.
-
21. The data processing system of claim 15 further comprising:
second adjusting means for adjusting the delta time using a plurality of trace overhead compensation values.
-
22. The data processing system of claim 15 further comprising:
setting means for setting the adjusted delta time to zero if the adjusted delta time is negative.
-
23. A computer program product in a computer-readable medium for use in a data processing system for determining temporal overhead in generating trace records, the computer program product comprising:
-
first instructions for profiling a program with enablement of trace record generation during a first time period;
second instructions for profiling a program with disablement of trace record generation during a second time period;
third instructions for obtaining a number of trace records generated during the first time period;
fourth instructions for calculating a trace overhead time value as a difference in length between the first time period and the second time period;
fifth instructions for computing a trace overhead calibration value as an average time for writing the number of trace records output during the trace overhead time value; and
sixth instructions for storing the output overhead calibration value for subsequent use in a profiling-related process in the data processing system. - View Dependent Claims (24, 25)
instructions for retrieving a first start time;
instructions for executing the program during which trace records are generated;
instructions for retrieving a first end time; and
instructions for computing the first time period as a difference between the first start time and the first end time.
-
-
25. The computer program product of claim 23, wherein the second instructions for profiling a program with disablement of trace record generation during the second time period further comprise:
-
instructions for retrieving a second start time;
instructions for executing the program during which trace records are not generated;
instructions for retrieving a second end time; and
instructions for computing the second time period as a difference between the first start time and the first end time.
-
-
26. A computer program product in a computer-readable medium for use in a data processing system for processing trace data output, the computer program product comprising:
-
first instructions for reading a first timestamp from a first trace record and a second timestamp from a second trace record;
second instructions for computing the difference between the two timestamps to obtain a delta time;
third instructions for retrieving a trace overhead compensation value; and
fourth instructions for adjusting the delta time by subtracting the trace overhead compensation value, wherein the trace overhead is determined by comparing a calibration run preceding a trace process. - View Dependent Claims (27, 28, 29, 30, 31, 32, 33)
instructions for computing an average amount of time to generate a trace record during the calibration run.
-
-
29. The computer program product of claim 26 wherein the trace overhead compensation value is directly proportional to a time required to generate a trace record.
-
30. The computer program product of claim 26 wherein the first trace record and the second trace record are output to a trace file during execution of a profiling process in the data processing system.
-
31. The computer program product of claim 26 further comprising:
instructions for attributing the adjusted delta time to a performance statistic for a routine whose execution caused the first trace record or the second trace record to be output.
-
32. The computer program product of claim 26 further comprising:
instructions for adjusting the delta time using a plurality of trace overhead compensation values.
-
33. The computer program product of claim 26 further comprising:
instructions for setting the adjusted delta time to zero if the adjusted delta time is negative.
Specification