Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ prof(1) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cc

nm

prof

PURPOSE

     Displays program profile data.

SYNOPSIS
     prof [-tcan][-ox][-t][-zhsg][-m mdata][-m mon.out][a.out][prog]


DESCRIPTION

     The prof command interprets profile data collected by the
     monitor  subroutine for  the object  file prog  (a.out by
     default).  It reads  the symbol table in  the object file
     prog and correlates it with  the profile file (mon.out by
     default).  prof displays, for  each external text symbol,
     the  percentage  of  execution  time  spent  between  the
     address of that  symbol and the address of  the next, the
     number of times that function was called, and the average
     number of milliseconds per call.

     For the number of calls to  a function to be tallied, you
     must have compiled  the file using the -p flag  of the cc
     command.  This flag also arranges  for the object file to
     include a special profiling  start-up function that calls
     the monitor subroutine  at the beginning and  end of exe-
     cution.  It  is the call  to monitor  at the end  of exe-
     cution  that writes  mon.out.  Thus,  only programs  that
     explicitly  exit or  return from  main cause  the mon.out
     file to be produced.

     Note:  No more than 600  functions can have call counters
     established during program execution.  If you exceed this
     limit, prof overwrites other data and damages the mon.out
     file.   prof automatically  reports  the  number of  call
     counters used whenever the number exceeds 500.

FLAGS

     The mutually exclusive flags a, c, n, and t determine how
     prof sorts the output lines:

     -a         Sorts by increasing symbol address.
     -c         Sorts by decreasing number of calls.
     -n         Sorts lexically by symbol name.
     -t         Sorts by  decreasing percentage of  total time
                (default).

     The  mutually exclusive  flags  o and  x  specify how  to
     display the address of each symbol monitored.

     -o         Displays each address in octal, along with the
                symbol name.

     -x         Displays  each address  in hexadecimal,  along
                with the symbol name.

     Use the following flags in any combination:

     -g         Includes nonglobal symbols (static functions).
                This option requires object code that was com-
                piled with the -g flag.
     -h         Suppresses the  heading normally  displayed on
                the report.  (This is  useful if the report is
                to be processed further.)
     -m  mdata  Takes  profiling data  from  mdata instead  of
                mon.out.
     -s         Displays  a summary  of monitoring  parameters
                and statistics on standard error.
     -z         Includes  all symbols  in  the profile  range,
                even if  associated with  zero calls  and zero
                time.

FILES

     mon.out    Default profile.
     a.out      Default object file.

RELATED INFORMATION

     The following commands:  "cc" and "nm."

     The exit and profil system  calls and the monitor subrou-
     tine in AIX Operating System Technical Reference.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026