*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> profil (2)              
Title
Content
Arch
Section
 

Contents


 profil(2)                                                         profil(2)




 NAME    [Toc]    [Back]
      profil - execution time profile

 SYNOPSIS    [Toc]    [Back]
      #include <time.h>

      void profil(
           unsigned short int *buff,
           size_t bufsiz,
           size_t offset,
           unsigned int scale
      );

 DESCRIPTION    [Toc]    [Back]
      profil() controls profiling, by which the system maintains estimates
      of the amount of time the calling program spends executing at various
      places in its address space.

      The buff argument must point to an area of memory whose length (in
      bytes) is given by bufsiz.  When profiling is on, the process's
      program counter (pc) is examined each clock tick (CLK_TCK times per
      second), offset is subtracted from the pc value, and the result is
      multiplied by scale.  If the resulting number corresponds to an
      element inside the array of unsigned short ints to which buff points,
      that element is incremented.

      The number of samples per second for a given implementation is given
      by CLK_TCK, which is defined in <time.h>.

      The scale is interpreted as an unsigned, sixteen bit, fixed-point
      fraction with binary point at the left: 0177777 (octal) gives a oneto-one
 mapping of pc's to words in buff; 077777 (octal) maps each pair
      of instruction words together.  02(octal) maps all instructions onto
      the beginning of buff (producing a non-interrupting core clock).

      Profiling is turned off by giving a scale of 0 or 1.  It is rendered
      ineffective by giving a bufsiz of 0.  Profiling is turned off when one
      of the exec() functions is executed, but remains on in child and
      parent both after a fork().  Profiling is turned off if an update in
      buff would cause a memory fault.

 RETURN VALUE    [Toc]    [Back]
      No value is returned.

 SEE ALSO    [Toc]    [Back]
      prof(1), monitor(3C).

 STANDARDS CONFORMANCE    [Toc]    [Back]
      profil(): SVID2, SVID3, XPG2


 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003
[ Back ]
      
      
 Similar pages
Name OS Title
sprofil IRIX execution time profile for disjoint text spaces
sprofil HP-UX execution time profile for disjointed text spaces
moncontrol NetBSD control execution profile
monstartup NetBSD control execution profile
monstartup Tru64 Prepare execution profile
monitor_signal Tru64 Prepare execution profile
monitor Tru64 Prepare execution profile
moncontrol FreeBSD control execution profile
moncontrol OpenBSD control execution profile
monitor IRIX prepare execution profile
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service