Browse Prior Art Database

Transition Records for Tracing Program Flows

IP.com Disclosure Number: IPCOM000117774D
Original Publication Date: 1996-Jun-01
Included in the Prior Art Database: 2005-Mar-31
Document File: 2 page(s) / 91K

Publishing Venue

IBM

Related People

Smolders, L: AUTHOR [+2]

Abstract

Disclosed is a method to deal with program flow discontinuities when using PowerPC* branch trace exception mechanism. A control record at the beginning and at the end of each exception is introduced to allow the trace exception facility to attribute the correct performance counter information to the correct kernel and user flows.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Transition Records for Tracing Program Flows

      Disclosed is a method to deal with program flow discontinuities
when using PowerPC* branch trace exception mechanism.  A control
record at the beginning and at the end of each exception is
introduced to allow  the trace exception facility to attribute the
correct performance counter  information to the correct kernel and
user flows.

      The PowerPC architecture provides facilities for performance
analysis.  One of these facilities, the trace exception, assists in
providing program flow information.  The trace exception is
controlled with the Machine State Register bits trace branch and
trace step. When  any exception occurs, these bits are
architecturally reset to zero. This  means that there is a
discontinuity in the tracing information because of  the exception.
That is, in the transition from user mode processing to  kernel mode
processing (or kernel to kernel), there is a discontinuity  of trace
information.  The exception architecture dictates that some
exception status is saved in the same state registers; that is, it is
architecturally infeasible to have the trace exception occur during
the early processing for other exceptions.  There is also a
discontinuity in trace information when there is a return made to an
interrupted program -- one of the ones where there is an exception
discontinuity above.  Again, because of the exception architecture,
it is not feasible to have the trace exception enabled during the
last part of exception processing.  If these discontinuities were not
to be accounted for, the trace flows would be inaccurate and/or
misleading.

      With instruction step tracing, where there is an exception at
the end of each instruction, it is fairly obvious to the analysis
programs when an exception occurs.  It is, therefore, relatively
straightforward to construct the flows with step tracing.  With
branch tracing, the performance monitor counters are used to
accumulate data used for performance and path flow analysis.  These
data are accumulated for program "basic blocks" -- essentially blocks
of instructions between branches.

      The same counters are used to accumulate data for kernel
processing and for user proce...