prof man page on SunOS

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
SunOS logo
[printable version]

prof(5)		      Standards, Environments, and Macros	       prof(5)

NAME
       prof - profile within a function

SYNOPSIS
       #define MARK
       #include <prof.h>

       void MARK(name);

DESCRIPTION
       MARK introduces a mark called  name that is treated the same as a func‐
       tion 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.

       name  may be any combination of letters, numbers, or  underscores. Each
       name in a single compilation must be unique, but may be the same as any
       ordinary program symbol.

       For  marks  to be effective, the symbol MARK must be defined before the
       header  prof.h is included, either by a	preprocessor directive	as  in
       the synopsis, or by a command line argument:

	      cc -p -DMARK work.c

       If  MARK	 is not defined, the  MARK(name) statements may be left in the
       source files  containing them and are ignored. prof -g must be used  to
       get information on all labels.

EXAMPLES
       In  this example, marks can be used to determine how much time is spent
       in each loop. Unless this example is compiled with  MARK defined on the
       command line, the marks are ignored.

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

SEE ALSO
       profil(2), monitor(3C)

SunOS 5.10			  3 Jul 1990			       prof(5)
[top]

List of man pages available for SunOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net