Debugging.s File Reference

Functions

void IPUTraceInit ()
 Initialize Trace Routine.
void IPUTraceShowTotal ()
 Show Total Execution.
void IPUTraceEnabled (Number isEnabled)
 Set Trace Status.
Object IPUTrace (String strName)
 Enter a Trace Block.
Object IPUTrace (String strName, String strArgs)
 Enter a Trace Block with Optional Message.

Detailed Description

These routines show call stacks and an execution profile.

Example:

Number MyFunc(Number n)
{
    Object tracer = IPUTrace("MyFunc", ""+n);
    if ( n > 1 ) {
        return n + MyFunc(n - 1);
    } else {
        return n;
    }
}

{
    IPUTraceEnabled(1);
    IPUTraceInit();
    
    Result(MyFunc(3)+"\n");
    
    IPUTraceShowTotal();
}

This will show the following results:

  MyFunc(3) {
    MyFunc(2) {
      MyFunc(1) {
      } 0.346692 ms
    } 4.86766 ms
  } 7.39452 ms
6

 Total Execution:
    MyFunc                          :    3 calls,     12.6 ms

Function Documentation

void IPUTraceInit (  ) 

Initialize Trace Routine.

example

You should call this before starting a trace.

void IPUTraceShowTotal (  ) 

Show Total Execution.

example

This shows total execution informtion, if the trace is enabled.

void IPUTraceEnabled ( Number  isEnabled  ) 

Set Trace Status.

Parameters:
isEnabled 1/0 for enable/disable.

example

Object IPUTrace ( String  strName  ) 

Enter a Trace Block.

Parameters:
strName Block name to be shown
Returns:
Tracer

example

Object IPUTrace ( String  strName,
String  strArgs 
)

Enter a Trace Block with Optional Message.

Parameters:
strName Block name to be shown
strArgs Any message to be shown
Returns:
Tracer

example


Generated on Wed Feb 29 16:36:11 2012 for Image Processing Utilities by  doxygen 1.6.1