OBPROF(1)

NAME
obprof - Oberon-2 profiler

SYNOPSIS
obprof [-o outfile] [-g] [-l] program [arg...]

DESCRIPTION
Obprof is a profiling tool that works with the Oberon-2 compiler obc. It runs the Oberon-2 program specified on the command line, passing to it any arguments specified. During execution of the program, obprof keeps an account of the number of machine cycles of the Oberon-2 abstract machine that are expended in executing each procedure in the program. After the program has terminated, the profile data is printed on standard error in the form of a table. For each procedure that was called at least once during execution, the number of calls and the percentage time are shown, in decreasing order of time. The -o flag specifies the name of an output file to be used instead of standard error. This is useful with shells that do not easily provide separate redirection of the standard output and error channels. The -g flag selects call-graph profiling similar to that provided by gprof, where the time taken by each subroutine is also charged to the account of its caller. The -l flag requests line-count profiling. Each module that has been compiled using the -pl flag to obc is monitored during execution, and obprof maintains a count of how many times each line of code has been executed. At the end of execution, these data are written to a file obprof.out for later analysis by the program obdump.

BUGS
The profiling does not take into account the time taken to execute primitive procedures that are implemented as part of the run-time system.

AUTHOR
Mike Spivey