Error detection/correction and fault detection/recovery – Data processing system error or fault handling – Reliability and availability
Reexamination Certificate
1999-09-09
2003-08-05
Beausoliel, Robert (Department: 2184)
Error detection/correction and fault detection/recovery
Data processing system error or fault handling
Reliability and availability
C712S029000
Reexamination Certificate
active
06604210
ABSTRACT:
BACKGROUND OF THE INVENTION
1. Technical Field
The present invention relates to an improved data processing system and, in particular, to a method and apparatus for optimizing performance in a data processing system. Still more particularly, the present invention provides a method and apparatus for a software program development tool for enhancing performance of a software program through software profiling.
2. Description of Related Art
In analyzing and enhancing performance of a data processing system and the applications executing within the data processing system, it is helpful to know which software modules within a data processing system are using system resources. Effective management and enhancement of data processing systems requires knowing how and when various system resources are being used. Performance tools are used to monitor and examine a data processing system to determine resource consumption as various software applications are executing within the data processing system. For example, a performance tool may identify the most frequently executed modules and instructions in a data processing system, or may identify those modules which allocate the largest amount of memory or perform the most I/O requests. Hardware performance tools may be built into the system or added at a later point in time. Software performance tools also are useful in data processing systems, such as personal computer systems, which typically do not contain many, if any, built-in hardware performance tools.
One known software performance tool is a trace tool. A trace tool may use more than one technique to provide trace information that indicates execution flows for an executing program. One technique keeps track of particular sequences of instructions by logging certain events as they occur, so-called event-based profiling technique. For example, a trace tool may log every entry into, and every exit from, a module, subroutine, method, function, or system component. Alternately, a trace tool may log the requester and the amounts of memory allocated for each memory allocation request. Typically, a time-stamped record is produced for each such event. Corresponding pairs of records similar to entry-exit records also are used to trace execution of arbitrary code segments, starting and completing I/O or data transmission, and for many other events of interest.
In order to improve performance of code generated by various families of computers, it is often necessary to determine where time is being spent by the processor in executing code, such efforts being commonly known in the computer processing arts as locating “hot spots.” Ideally, one would like to isolate such hot spots at the instruction and/or source line of code level in order to focus attention on areas which might benefit most from improvements to the code.
Another trace technique involves program sampling to identify certain locations in programs in which the programs appear to spend large amounts of time. This technique is based on the idea of interrupting the application or data processing system execution at regular intervals, so-called sample-based profiling. At each interruption, the program counter of the currently executing thread, a process that is part of a larger process or program, is recorded. Typically, these tools capture values that are resolved against a load map and symbol table information for the data processing system at post-processing time, and a profile of where the time is being spent is obtained from this analysis.
For example, isolating such hot spots to the instruction level permits compiler writers to find significant areas of suboptimal code generation, at which they may thus focus their efforts to improve code generation efficiency. Another potential use of instruction level detail is to provide guidance to the designer of future systems. Such designers employ profiling tools to find characteristic code sequences and/or single instructions that require optimization for the available software for a given type of hardware.
Event-based profiling has limitations. For example, event-based profiling is expensive in terms of performance (an event per entry and per exit), which can and often does perturb the resulting view of performance. Additionally, this technique is not always available because it requires the static or dynamic insertion of entry/exit events into the code. This insertion of events is sometimes not possible or is often difficult. For example, if source code is unavailable for the to-be-instrumented code, event-based profiling may not be feasible. However, it is possible to instrument an interpreter of the source code to obtain event-base profiling information without changing the source code.
On the other hand, sample-based profiling provides only a “flat view” of system performance but does provide the benefits of reduced cost and reduced dependence on hooking-capability. Further, sample-based techniques do not identify where the time is spent in many small and seemingly unrelated functions or in situations in which no clear hot spot is apparent. Without an understanding of the program structure, it is not clear with a “flat” profile how to determine where the performance improvements can be obtained.
Trace data for event-based profiling may be generated in a manner in which the trace file should contain corresponding pairs of events. In some situations, the event-based profiling information in a trace file may have one or more missing events, and these profiling errors cause difficulties in processing the trace file. Therefore, it would be advantageous to detect such errors and continue processing the remainder of a trace file.
SUMMARY OF THE INVENTION
A method and system for detecting and recovering from errors in trace data is provided. The trace data records selected events for executing routines, and the routines corresponding to the events are represented as one or more nodes in a tree structure. The events may be entries and exits to executing methods. A trace record identifying a routine is read, and an error condition is detected in which the identified routine does not match a routine corresponding to a current node in the tree structure. The tree structure is searched for a node that corresponds to the identified routine. Performance statistics, such as execution time, are attributed to nodes in the tree structure. In response to a determination that the current node is a root node of the tree structure, then a new node for the identified routine is added to the tree structure as a child node of the root node and spliced into the tree at the root node.
REFERENCES:
patent: 5047919 (1991-09-01), Sterling et al.
patent: 5355487 (1994-10-01), Keller et al.
patent: 5388268 (1995-02-01), Beach et al.
patent: 5613118 (1997-03-01), Heisch et al.
patent: 5649085 (1997-07-01), Lehr
patent: 5768500 (1998-06-01), Agrawal et al.
patent: 5777622 (1998-07-01), Lehr
patent: 5862381 (1999-01-01), Advani et al.
patent: 5889993 (1999-03-01), Kroeger et al.
patent: 5898873 (1999-04-01), Lehr
patent: 5970245 (1999-10-01), Poteat et al.
patent: 6002872 (1999-12-01), Alexander et al.
patent: 6006032 (1999-12-01), Blandy et al.
patent: 6026236 (2000-02-01), Fortin et al.
patent: 6055492 (2000-04-01), Alexander et al.
patent: 6158024 (2000-12-01), Mandal
patent: 6189142 (2001-02-01), Johnston
patent: 6275956 (2001-08-01), On et al.
patent: 6332212 (2001-12-01), Organ et al.
patent: 6338159 (2002-01-01), Alexander et al.
patent: 6349393 (2002-02-01), Cox
patent: 6349406 (2002-02-01), Levine et al.
patent: 6353924 (2002-03-01), Ayers et al.
“Insertion and Reading Algorithms for Visualization” IBM TDB vol. 37, Issue 6A, pp 397-400, Jun. 1, 1994, Xref 0018-8689-37 6A-397.*
International Business Machines; Data Structure and Insertion Algorithm for Representing Asynchronous Occurrences for Visualization by Trace Visualization Tools Using Ghant Charts with Occurance Hierarchies; Jul. 1993; pp. 547-557; IBM Technical Disclosure Bulletin; vol. 36, No. 07.
International Business Machines; Adaptive Trace-Direc
Alexander, III William Preston
Levine Frank Eliot
Urquhart Robert J.
Beausoliel Robert
Bonzo Bryce P.
Leeuwen Leslie A. Van
Nichols Michael R.
Yee Duke W.
LandOfFree
Method and system for detecting and recovering from in trace... does not yet have a rating. At this time, there are no reviews or comments for this patent.
If you have personal experience with Method and system for detecting and recovering from in trace..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method and system for detecting and recovering from in trace... will most certainly appreciate the feedback.
Profile ID: LFUS-PAI-O-3104200