Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

prof(1)

monitor(3)

profil(2)



  prof(0)                             CLIX                             prof(0)



  NAME

    prof - Profile within a function

  SYNOPSIS

    #define MARK

    #include <prof.h>

    void MARK(
      char *name );

  PARAMETERS

    name   The name of the mark to be introduced.  This name may be any
           combination of letters, numbers, or underscores up to six
           characters.  A name must be unique.

  DESCRIPTION

    The MARK() function introduces a mark called name which is treated as a
    function entry point.  Execution of the mark adds to a counter for that
    mark, and program-counter time spent is accounted to the immediately
    preceding mark or to the function, if there are no preceding marks within
    the active function.

  EXAMPLES

    For marks to be effective, the symbol MARK must be defined preceding the
    header file <prof.h> by using a preprocessor directive or a command line
    argument such as:

    cc -p -DMARK foo.c

    which, in the forthcoming example, compiles the program foo.c.

    The marks determine the time spent in each loop.

    #include <prof.h>
    foo()
    {
         int i, j;
         ...
         MARK(loop1);
         for (i = 0; i < 2000; i++) {
              ...
         }
         MARK(loop2);
         for (j = 0; j < 2000; j++) {
              ...



  2/94 - Intergraph Corporation                                              1






  prof(0)                             CLIX                             prof(0)



         }
    }


  FILES

    /usr/include/prof.h   File in which the MARK macro is defined.

  CAUTIONS

    Unless this example is compiled with the MARK defined on the command line,
    the MARK(name) statements could be left in the source files containing
    them and would be ignored.

  RELATED INFORMATION

    Commands:  prof(1)

    Functions:  monitor(3), profil(2)



































  2                                              Intergraph Corporation - 2/94




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