PROF(1) PROF(1) NAME prof, wm/prof - profiling limbo programs SYNOPSIS prof [ -bflnve ] [ -m modname ] ... [ -s rate ] [ cmd arg ... ] wm/prof [ -e ] [ -m modname ] ... [ -s rate ] [ cmd arg ... ] DESCRIPTION Prof is a simple profiling tool which calculates the per- centage of time spent on a particular line of limbo source or spent in a particular limbo function. It can determine where a module or set of modules is spending its time. The source in question should be compiled with the -g flag so that the relevant symbol table files exist. The tk version of the profiler wm/prof shows this informa- tion in a text widget and colours the lines of source according to the amount of time spent on each line. The darker the colour, the longer spent. The -b option starts profiling. The -f option shows the function profile. The -l option shows the line profile. If neither this option nor the -f option are given, -l is assumed. The -n option lists the name of the file along with the line number. The -v option outputs all functions and/or lines even when the percentage of time spent in them is zero. The -m option lists the module names which are to be pro- filed. If none are given, all the modules loaded by the ker- nel will be profiled. The name may be the actual name of the module or its path name. The -e option profiles the module that is loaded first in any following command. In this case there is no need to give a -m option as this is added automatically. The -s option sets the sample interval rate and is expressed in ms. The default is 100 ms. Any remaining arguments are assumed to specify a command and set of arguments to the command. If this is the case, prof PROF(1) PROF(1) will automatically start profiling, run the command to com- pletion and then stop profiling before showing the profile statistics. Prof displays the profile statistics (unless the -b option is being used) according to the output format required. EXAMPLE To profile a particular command prof /dis/math/parts 10000 wm/prof /dis/math/parts 10000 To profile the same command but restrict attention to its own module (Partitions). prof -m Partitions /dis/math/parts 10000 wm/prof -m Partitions /dis/math/parts 10000 A shorter version of the above prof -e /dis/math/parts 10000 wm/prof -e /dis/math/parts 10000 To profile interactively prof -b -m Partitions -s 10 /dis/math/parts 10000 prof -f -l -n Note that the output format options ( -f , -l , -n , -v ) are ignored when -b is present. SOURCE /appl/cmd/prof.b /appl/wm/prof.b SEE ALSO cprof(1), mprof(1), cprof(1), mprof(1), prof(2), prof(3) BUGS Prof cannot profile compiled limbo programs.