摘要:
A method and apparatus for identifying differences in runs of a computer program that are due to changes in the code of the computer program. With the apparatus and method, call trees are generated for two or more builds of a computer program. The apparatus and method perform a “tree-subtract” operation in which the two or more call trees generated during runs of two or more different builds of a computer program are subtracted from one another to identify build to build differences in the execution of the computer program. From the resulting tree, portions of the runs of the different builds of the computer program where the resource utilization of the computer program has not changed are easily identifiable. Moreover, portions of the runs of the different builds of the computer program where there are improvements or regressions in resource utilization of the computer program may be easily identifiable.
摘要:
A method and apparatus for averaging out variations from run to run of a computer program are provided. With the apparatus and method, call trees are generated for two or more executions of a build of a computer program. The apparatus and method perform a “tree-addition” operation in which the two or more call trees generated during runs of the computer program are added to one another to thereby accumulate statistics for each call in the call trees. These statistics may then be divided by the number of runs whose tree data structures are being accumulated. In this way, an average of the tree data structures is generated. In addition, any portions of the tree data structure that are due to asynchronous events are averaged out so that their relative affect in the resulting tree data structure is minimized.
摘要:
A method and apparatus for identifying a minimum call tree data structure from a plurality of call tree data structures are provided. With the apparatus and method, call tree data structures are generated for two or more executions of a build of a computer program. The apparatus and method perform a “tree-minimization” operation in which the two or more call trees generated during runs of the computer program are walked and only those nodes that are present in each of the tree data structures are maintained in a minimized tree data structure. In addition, the minimum values for these common nodes are maintained in the minimized tree data structure. In this way, asynchronous events are removed from the minimum tree data structure and analysis may focus on those areas of the computer program that are consistent between runs of the computer program.
摘要:
A method and apparatus for identifying a minimum call tree data structure from a plurality of call tree data structures are provided. With the apparatus and method, call tree data structures are generated for two or more executions of a build of a computer program. The apparatus and method perform a “tree-minimization” operation in which the two or more call trees generated during runs of the computer program are walked and only those nodes that are present in each of the tree data structures are maintained in a minimized tree data structure. In addition, the minimum values for these common nodes are maintained in the minimized tree data structure. In this way, asynchronous events are removed from the minimum tree data structure and analysis may focus on those areas of the computer program that are consistent between runs of the computer program.
摘要:
A method, apparatus, and computer instructions in a processor for associating a data type with a memory location. The type is associated with a location by means of metadata that is generated and manipulated by hardware instructions that are typically generated by a compiler as it generates the other instructions that comprise the machine code version of a program. A determination is made as to whether a data value about to be stored is of the required data type for that location. The hardware indicates an error condition if the types do not match.
摘要:
A method, apparatus, and computer instructions in a processor for performing arithmetic operations. A data type associated with a particular memory location is used to determine if an operation about to be performed on the data in that location is legal. If the operation requires the data to have a required data type, a determination is made as to whether the operation is a legal operation based on the identified data type and the required data type. If the operation is not legal on the identified type, a determination is made as to whether data can be cast to change the identified data type to the required data type. The data is cast to the required data type if the data can be cast to form modified data, and the arithmetic operation is performed on the modified data. If the data cannot be cast to the Required type, an exception or interrupt is generated.
摘要:
A method, apparatus, and computer instructions in a processor for associating a data type with a memory location. The type is associated with a location by means of metadata that is generated and manipulated by hardware instructions that are typically generated by a compiler as it generates the other instructions that comprise the machine code version of a program. A determination is made as to whether a data value about to be stored is of the required data type for that location. The hardware indicates an error condition if the types do not match.
摘要:
A method, apparatus, and computer instructions in a processor for checking assertions. A determination by the processor is made as to whether metadata for an assertion is associated with the memory location, in response to detecting a change in data in a memory location. The data to the assertion is compared by the processor, in response to the metadata being associated with the memory location. An error is generated by the processor if the assertion is invalid, with respect to the data. The processor checks the assertions for validity.
摘要:
The present invention is a system, method, and computer readable medium for representing program event trace information in a way which is very compact and efficient, and yet supports a wide variety of queries regarding system performance. The tracing and reduction of the present invention may be dynamic, in which case information is obtained and added to the trace representation in real-time. Alternately, the tracing and reduction may be static, in which case a trace text file or binary file is obtained from a trace buffer, and the reduction takes place using the trace file as input. The trace information, whether obtained statically or dynamically, is represented as a tree of events. The present invention may be used to present many types of trace information in a compact manner which supports performance queries. For example, the tree structure of the present invention may reflect the call stacks observed during a program's execution, and statistics regarding the memory allocated/deallocated in the various routines and call stacks may be stored at each node of the tree. The tree structure may be used to store performance information regarding Java bytecodes executed, memory allocated, or other types of performance information. The trace information is presented in a manner which is compact and efficient, and may be used to quickly and easily answer a variety of performance queries. Further, a system may be traced for long periods of time without losing useful performance information due to a limited buffer space.
摘要:
A system and method for collecting a plurality of metrics during a single run of a computer program. The mechanism of the present invention initializes a plurality of counters to count events associated with metrics of interest. The mechanism of the present invention then counts the occurrence of events associated with metrics of interest during a single execution of a computer program. When a branch has been taken, a trace record is generated for the branch taken, wherein the generated trace record contains a count of events associated with the metrics of interest for the branch taken.