摘要:
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.
摘要:
Hardware assist to autonomically patch code. The present invention provides hardware microcode to a new type of metadata to selectively identify instructions to be patched for specific performance optimization functions. The present invention also provides a new flag in the machine status register (MSR) to enable or disable a performance monitoring application or process to perform code-patching functions. If the code patching function is enabled, the application or process may patch code at run time by associating the metadata with the selected instructions. The metadata includes pointers pointing to the patch code block code. The program code may be patched autonomically without modifying original code.
摘要:
An improved method, apparatus, and computer instructions for generating trace data. In response to detecting a new trace event, a determination is made as to whether the new trace event occurred at an expected period of time with respect to a prior trace event. A time stamp in the trace data is placed in response to a determination that the new trace event did not occur at the expected period of time, wherein time stamps occurring at the expected period if time are eliminated from the trace data and wherein compression of the trace data occurs.
摘要:
A method and system for detecting and counting bytecode sequences in a data processing system is provided. A bytecode tree data structure is used to represent sequences of bytecodes. A bytecode sequence is a subset of consecutive bytecodes within the set of bytecodes. The bytecode tree data structure contains a set of nodes in which each node represents a bytecode in a bytecode sequence or subsequence and in which a path through the bytecode tree data structure represents a bytecode sequence or subsequence. Each node of the bytecode tree data structure records one or more bytecode occurrence statistics for its corresponding bytecode in a set of bytecode sequences or subsequences. In order to determine the frequency of occurrence of common bytecode sequences and subsequences, a bytecode sequence tree data structure is generated from a set of bytecode sequences. The bytecode sequence tree data structure is then convolved into a bytecode subsequence occurrence tree data structure, which is a union of all subtrees of the bytecode sequence tree data structure.
摘要:
A method and system for monitoring performance of a program using global metric variables to provide the support in an symmetric multiprocessor (SMP) system. A Java virtual machine (Jvm) either calls the profiler whenever bytes are allocated or provides an interface to allow the profiler to determine the value of the change in the metric for the current thread. The profiler then applies the changes to a metric for the current thread. Alternatively, per processor data areas are maintained for storing per processor metric values. Whenever a thread switch occurs or there is a request for the metric on a specified thread, an operating system kernel updates the thread level metric values with changes in the values per processor metrics.
摘要:
The value of non-discrete metric variables are synchronized at the processor level. When the profiler requests metric information for non-discrete metric variables, the operating system kernel obtains a global value for the requested metric rather than obtaining per-processor metric values for each processor. The global value may be written to trace records. By using a single global per-processor metric for all processors, a single global value of the last metric variable may be used for calculating the resources consumed on all processors since a last recorded event.
摘要:
A method and system for detecting memory leaks in an object-oriented environment during real-time trace processing is provided. During the profiling of a program executing in a data processing system, a profiler processes events caused by the execution of the program, and the profiler maintains a profile data structure containing execution-related metrics for the program. The execution-related metrics may include object allocation and deallocation metrics that are associated with object processing initiated on behalf of an executing method. An object allocator allocates objects during the execution of the program and modifies object allocation metrics in the profile data structure. Object metrics are stored in a particular location and a pointer to that location is stored in a hash table associated with the object's ID. In another embodiment the pointer to the location is stored in a shadow heap in the same relative position as the position of the object in the heap. The object allocation metrics and the object deallocation metrics may be compared to identify memory leaks.
摘要:
A method and system for compensating for output overhead in trace data is provided by analyzing and compensating for the overhead associated with outputting trace information to a trace buffer or a trace file in the form of trace records. A trace record represents an occurrence of some profiling event of interest. Each trace record contains a starting timestamp representing the time at which the generation of the trace record was commenced and an ending timestamp representing the time at which the generation of the trace record was completed. In order to compute the period of execution time attributable to the application program or system being profiled, a starting timestamp of a trace record is compared with the ending timestamp of a preceding trace record, and the difference between the timestamps is directly related to the execution time of the application program or system being profiled. The time period between the timestamps in a trace record is implicitly disregarded as attributable to overhead in the generation of trace records.
摘要:
A method and system for compensating for trace overhead is provided by analyzing and compensating for the temporal overhead associated with generating or outputting trace information to a trace buffer or a trace file in the form of trace records. A trace record generally represents an occurrence of a profiling event of interest. The amount of time required to generate a trace record may be determined, and the trace times retrieved from the trace records are adjusted to compensate for the amount of time required to generate those trace records. A trace overhead calibration value may be determined by computing the average time necessary to generate a trace record, or in certain cases, by computing the minimum time necessary to generate a trace record. The trace overhead calibration value is stored for subsequent use in a profiling-related process in the data processing system.
摘要:
A method and apparatus for instrumenting garbage collection in a data processing system is provided. During garbage collection, a pass is made through the object heap and a plurality of heap data is retrieved and written to a trace file. The data may include the type of object, the size of the object on the heap, the class of the object, if appropriate, and a plurality of pointers, including live set pointers, and one or more tags representing attributes that may be associated with the particular object. The instrumentation may controlled to occur at a preselected phase of the garbage collection process. Additionally, a user may dynamically initiate a garbage collection instrumentation if the user determines that an event has occurred during the operation of the data processing system about which the user wishes further data.