background image
{{<argnum>}}
Arguments to the function being profiled may also be referenced by
number, starting with 0 and increasing.
{{returnVal}}
ReturnVal expands to the variable that is used to hold the return
value of the function being profiled.
{{callfn}}
callfn expands to the call of the function being profiled. With nested wrapper
definitions, this also represents the point at which to insert the code for any
inner nested functions. The nesting order is determined by the order in which
the wrappers are encountered by wrappergen. For example, if the two files
`prof1.w' and `prof2.w' each contain two wrappers for MPI Send, the profiling
code produced when using both files will be of the form:
int MPI_Send( args...)
arg declarations...
{
/*pre-callfn code from wrapper 1 from prof1.w */
/*pre-callfn code from wrapper 2 from prof1.w */
/*pre-callfn code from wrapper 1 from prof2.w */
/*pre-callfn code from wrapper 2 from prof2.w */
returnVal = MPI_Send( args... );
/*post-callfn code from wrapper 2 from prof2.w */
/*post-callfn code from wrapper 1 from prof2.w */
/*post-callfn code from wrapper 2 from prof1.w */
/*post-callfn code from wrapper 1 from prof1.w */
return returnVal;
}
{{fn <function name escape>
<function A> <function B> ... }}
...
{{callfn}}
...
{{endfnall}}
fn is identical to fnall except that it only generates wrappers for functions
named explicitly. For example:
29