Method and system for software instruction level tracing in...

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S152000, C717S152000, C717S152000

Reexamination Certificate

active

06223338

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Technical Field
The present invention relates in general to a method and system for data processing and in particular to an improved method and system for instruction level tracing. Still more particularly, the present invention relates to a method and system for direct access to code by taking a trace by way of an interruption without having to allocate any memory or modify the code being traced.
2. Description of the Related Art
Conventionally, code debugging in a data processing or computer system can be accomplish by either inserting calls to a tracing code routine (i.e. instrumenting) in the code to be traced, or using the tracing facility of the system to single step through the code (i.e., generate an interruption after the execution of each instruction). When using the instrumentation technique by inserting calls to a tracing code routine, the first step of the routine is typically to locate the basic blocks of the code to be traced which is usually a non-trivial and slow operation especially on data processing systems with dynamic branches like the PowerPC line of microprocessors available from IBM Microelectronics. Additionally, when using the tracing facility of the machine, tracing becomes quite slow due to the fact that the flow of instruction is interrupted each instruction due to single stepping through the code.
Also, when utilizing the instrumentation approach, it is always necessary for the tracing code routine to allocate memory for each basic block traced. At the very least, the instruction replaced by a branch to the tracing code routine has to be allocated and saved to memory. The amount of memory necessary to complete this task may be considerable, mainly because all the basic blocks in the workload to be traced have to be instrumented because it is not known in advance which one will be executed. Lastly, on the PowerPC™ line of microprocessors available from IBM Microelectronics (e.g., the PowerPC™ 604) there is also a limit of 26 bits that can be used for branch displacements. This causes limitations on what can be instrumented with big executables.
Consequently, it would be desirable to provide an improved method and system that does not have any limitation on the number of basic blocks that can be traced. In particular, it would be desirable to provide an improved method and system which utilizes tracing by way of an interruption to directly access code without having to allocate memory.
SUMMARY OF THE INVENTION
It is therefore one object of the present invention to provide an improved method and system for data processing.
It is another object of the present invention to provide an improved method and system for instruction level tracing.
It is yet another object of the present invention to provide an improved method and system to directly access code by taking a trace by way of an interruption without having to allocate memory.
The foregoing objects are achieved as is now described. A method and system within a data processing system are disclosed for directly accessing code from a running program (hereafter called a process) by taking a trace by way of using an interruption. According to the present invention, the processor is programmed to generate a trace interrupt after each branch, or at the end of each basic block of code from the currently running program or process. This allows generation of exactly the same number of interruptions as would be produced by an instrumentation approach but without having to know where the basic blocks are in advance. By programming the performance monitor feature to count instructions, the exact size of each basic block is known. At each interrupt, the address of the beginning of the next block is saved which is the address where the interruption came from. Tracing information for the previous block including its address and its size (the current value of a counter) is created. If the current process is a process to be traced, the tracing information is stored in a trace buffer, the counter is reset to zero returning back to the process from the interrupt.
The above as well as additional objects, features, and advantages of the present invention will become apparent in the following detailed written description.


REFERENCES:
patent: 4598364 (1986-07-01), Gum et al.
patent: 4791557 (1988-12-01), Angel et al.
patent: 5142634 (1992-08-01), Fite et al.
patent: 5274811 (1993-12-01), Borg et al.
patent: 5394544 (1995-02-01), Motoyama et al.
patent: 5446876 (1995-08-01), Levine et al.
patent: 5542109 (1996-07-01), Blomgren et al.
patent: 5551051 (1996-08-01), Silverthorn et al.
patent: 5560036 (1996-09-01), Yoshida
patent: 5594864 (1997-01-01), Trauben
patent: 5615357 (1997-03-01), Ball
patent: 5625785 (1997-04-01), Miura et al.
patent: 6006033 (1999-12-01), Heisch
Transition Records for Tracing Program Flows. IBM Technical Disclosure Bulletin. June 1996, US. vol. 39. Issue No. 6. pp. 11-12.*
Ramfrez et al., Software Trace Cache. ACM. 1999. pp. 119-126.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Method and system for software instruction level tracing in... 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 software instruction level tracing in..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method and system for software instruction level tracing in... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2551891

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.