Inspect Manual

Using Inspect With Accelerated Programs on TNS/R
Systems
Inspect Manual429164-006
16-3
Performance and Debugging of Accelerated
Programs
Performance and Debugging of Accelerated Programs
When you accelerate your program, instructions have been reordered and some may
have been eliminated as a result of optimizations. As a result, the correspondence
between TNS and TNS/R instructions has disappeared at most locations. A block of
TNS/R instructions corresponding to a TNS instruction may be interleaved with other
TNS/R instructions.
Listed is a summary of the primary ways that OCA improves program performance.
The sections that follow explain these methods in detail and how they affect
debugging.
Retaining the values of frequently used variables in TNS/R system registers
Inspect does not have information about when variables are stored in registers.
The storing of values in registers can result in displayed memory values being out
of date, memory modifications having no effect, and data breakpoints not being
reported when expected.
The elimination of unused code and the reordering of code
Elimination of unused code can mean that you will not be able to place breakpoints
at some code locations. This elimination and reordering of code also affects
stepping and statement tracing, which skips any statements for which code has
been eliminated or combined with the code for a previous statement.
The elimination of branch chains
If a program contains a branch to a label at which there is a branch to another
location, the accelerator may generate code that branches directly to the target
location. Such optimizations could alter the flow of control in the program.
TNS instruction side effects
When the accelerator optimizes code, it may eliminate TNS instruction side effects
that are not used by the program. On TNS/R systems, TNS side effects such as
setting the condition codes are not part of the hardware, whereas on TNS systems
they are. If the logic of your program depends on the condition codes, the
accelerator will generate code to preserve them; otherwise, they are not preserved.
Accelerated Program Transitions
To generate an accelerated program, the accelerator must be able to predict the
possible execution paths in the program and be able to predict the value of the TNS
register pointer (RP) at each location. Some TNS program constructs require
evaluation at execution time and their behavior cannot be reliably predicted by the
accelerator. For such constructs—such as the SETP instruction—the accelerator
generates code that checks if the conditions required by the generated code are met. If
they are met, execution of TNS/R instructions continues; if not, execution transfers to
the corresponding TNS instructions which are executed using millicode. Execution of
TNS/R instructions will resume as soon as possible.