Processing events during profiling of an instrumented program
First Claim
1. A method for processing events detected while profiling an instrumented program in a data processing system, the method comprising the computer-implemented steps of:
- receiving a metric indicator trace record containing a set of flags that identify metrics to be generated;
detecting a current event;
in response to the current event, computing a vector of metrics since a preceding event, wherein the vector of metrics includes metrics identified in the metric indicator trace record;
storing the vector of metrics; and
generating overflow flags indicating metrics that have overflowed a predetermined numeric data type during a time period between the previous event and the current event.
1 Assignment
0 Petitions
Accused Products
Abstract
A user may specify a vector of metrics to be used while profiling a program. The vector of metrics may optionally be thread-relative. In response to a notification of an occurrence of the current event, a thread-relative elapsed metric is computed by: determining a current thread; retrieving a stored reference metric for the preceding event of the current thread; obtaining a current reference metric; and computing the thread-relative elapsed metric as a difference between the current reference metric and the stored reference metric. In order to prevent the generation of redundant metric information, the information associated with the vector of metrics maybe placed into the trace records in several different space-saving formats.
158 Citations
30 Claims
-
1. A method for processing events detected while profiling an instrumented program in a data processing system, the method comprising the computer-implemented steps of:
-
receiving a metric indicator trace record containing a set of flags that identify metrics to be generated;
detecting a current event;
in response to the current event, computing a vector of metrics since a preceding event, wherein the vector of metrics includes metrics identified in the metric indicator trace record;
storing the vector of metrics; and
generating overflow flags indicating metrics that have overflowed a predetermined numeric data type during a time period between the previous event and the current event. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
in response to the current event, generating a request for a vector of metrics since a preceding event.
-
-
3. The method of claim 1 further comprising:
invoking an application programming interface to retrieve a vector of metrics.
-
4. The method of claim 1 further comprising:
allowing a user to specify a plurality of metrics as a vector of metrics to be generated during a profiling phase of the instrumented program.
-
5. The method of claim 1 further comprising:
outputting trace records during execution of a profiling process in the data processing system.
-
6. The method of claim 1 further comprising:
generating a trace record for the current event, wherein the trace record comprises values equal to the computed vector of metrics.
-
7. The method of claim 1 further comprising:
generating a metric indicator trace record containing a set of flags to identify metrics to be generated in subsequently generated trace records.
-
8. The method of claim 1 further comprising, for each specified metric in the vector of metrics:
-
retrieving a stored reference metric for the preceding event, wherein the specified metric is associated with the reference metric;
obtaining a current reference metric; and
computing the specified metric in the vector of metrics as a difference between the current reference metric and the stored reference metric.
-
-
9. The method of claim 1 wherein the vector of metrics is a vector of thread-relative metrics.
-
10. The method of claim 9 further comprising, for each specified metric in the thread-relative vector of metrics:
-
determining a current thread;
retrieving a stored reference metric for the preceding event of a current thread, wherein the specified metric is associated with the reference metric;
obtaining a current reference metric; and
computing the thread-relative metric as a difference between the current reference metric and the stored reference metric.
-
-
11. A data processing system for processing events detected while profiling an instrumented program in the data processing system, the data processing system comprising:
-
receipt means for receiving a metric indicator trace record containing a set of flags that identify metrics to be generated;
detecting means for detecting a current event;
first computing means for computing, in response to the current event, a vector of metrics since a preceding event, wherein the vector of metrics includes metrics identified in the metric indicator trace record;
storing means for storing the vector of metrics; and
fourth generating means for generating overflow flags indicating metrics that have overflowed a predetermined numeric data type during a time period between the previous event and the current event. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
first generating means for generating, in response to the current event, a request for a vector of metrics since a preceding event.
-
-
13. The data processing system of claim 11 further comprising:
invoking means for invoking an application programming interface to retrieve a vector of metrics.
-
14. The data processing system of claim 11 further comprising:
allowing means for allowing a user to specify a plurality of metrics as a vector of metrics to be generated during a profiling phase of the instrumented program.
-
15. The data processing system of claim 11 further comprising;
outputting means for outputting trace records during execution of a profiling process in the data processing system.
-
16. The data processing system of claim 11 further comprising:
second generating means for generating a trace record for the current event, wherein the trace record comprises values equal to the computed vector of metrics.
-
17. The data processing system of claim 11 further comprising:
third generating means for generating a metric indicator trace record containing a set of flags to identify metrics to be generated in subsequently generated trace records.
-
18. The data processing system of claim 11 further comprising, for each specified metric in the vector of metrics:
-
first retrieving means for retrieving a stored reference metric for the preceding event, wherein the specified metric is associated with the reference metric;
first obtaining means for obtaining a current reference metric; and
second computing means for computing the specified metric in the vector of metrics as a difference between the current reference metric and die stored reference metric.
-
-
19. The data processing system of claim 11 wherein the vector of metrics is a vector of thread-relative metrics.
-
20. The data processing system of claim 19 further comprising, for each specified metric in the thread-relative vector of metrics:
-
determining means for determining a current thread;
second retrieving means for retrieving a stored reference metric for the preceding event of a current thread, wherein the specified metric is associated with the reference metric;
second obtaining means for obtaining a current reference metric; and
third computing means for computing the thread-relative metric as a difference between the current reference metric and the stored reference metric.
-
-
21. A computer program product in a computer-readable medium for use in a data processing system for processing events detected while profiling an instrumented program, the computer program product comprising:
-
first instructions for receiving a metric indicator trace record containing a set of flags that identify metrics to be generated;
second instructions for detecting a current event;
third instructions for in response to the current event, computing a vector of metrics since a preceding event, wherein the vector of metrics includes metrics identified in the metric indicator trace record;
fourth instructions for storing the vector of metrics; and
fifth instructions for generating overflow flags indicating metrics that have overflowed a predetermined numeric data type during a time period between the previous event and the current event. - View Dependent Claims (22, 23, 24, 25, 26, 27, 28, 29, 30)
instructions for generating, in response to the current event, a request for a vector of metrics since a preceding event.
-
-
23. The computer program product of claim 21 further comprising:
instructions for invoking an application programming interface to retrieve a vector of metrics.
-
24. The computer program product of claim 21 further comprising:
instructions for allowing a user to specify a plurality of metrics as a vector of metrics to be generated during a profiling phase of the instrumented program.
-
25. The computer program product of claim 21 further comprising:
instructions for outputting trace records during execution of a profiling process in the data processing system.
-
26. The computer program product of claim 21 further comprising:
instructions for generating a trace record for the current event, wherein the trace record comprises values equal to the computed vector of metrics.
-
27. The computer program product of claim 21 further comprising:
instructions for generating a metric indicator trace record containing a set of flags to identify metrics to be generated in subsequently generated trace records.
-
28. The computer program product of claim 21 further comprising, for each specified metric in the vector of metrics:
-
instructions for retrieving a stored reference metric for the preceding event, wherein the specified metric is associated with the reference metric;
instructions for obtaining a current reference metric; and
instructions for computing the specified metric in the vector of metrics as a difference between the current reference metric and the stored reference metric.
-
-
29. The computer program product of claim 21 wherein the vector of metrics is a vector of thread-relative metrics.
-
30. The computer program product of claim 29 further comprising, for each specified metric in the thread-relative vector of metrics:
-
instructions for determining a current thread;
instructions for retrieving a stored reference metric for the preceding event of a current thread, wherein the specified metric is associated with the reference metric;
instructions for obtaining a current reference metric; and
instructions for computing the thread-relative metric as a difference between the current reference metric and the stored reference metric.
-
Specification