Starts and stops execution profiling after initialization by the monitor subroutine.
#include <mon.h>
int moncontrol ( Mode)
int Mode;
The moncontrol subroutine starts and stops profiling after profiling has been initialized by the monitor subroutine. It may be used with either -p or -pg profiling. When moncontrol stops profiling, no output data file is produced. When profiling has been started by the monitor subroutine and the exit subroutine is called, or when the monitor subroutine is called with a value of 0, then profiling is stopped, and an output file is produced, regardless of the state of profiling as set by the moncontrol subroutine.
The moncontrol subroutine examines global and parameter data in the following order:
The global variable is set to -1 in the mcrt0.o file and to +1 in the gcrt0.o file and defaults to 0 when the crt0.o file is used.
The following global variables are used in a call to the profil
(profil Subroutine) subroutine:
_mondata.ProfBuf | Buffer address |
_mondata.ProfBufSiz | Buffer size/multirange flag |
_mondata.ProfLoPC | PC offset for hist buffer - I/O limit |
_mondata.ProfScale | PC scale/compute scale flag. |
These variables are initialized by the monitor subroutine each time it is called to start profiling.
Mode | Specifies whether to start (resume) or stop profiling. |
The moncontrol subroutine returns the previous state of profiling. When the previous state was STOPPED, a 0 is returned. When the previous state was STARTED, a 1 is returned.
When the moncontrol subroutine detects an error from the call to the profil subroutine, a -1 is returned.
This subroutine is part of Base Operating System (BOS) Runtime.
The monitor (monitor Subroutine) subroutine, monstartup (monstartup Subroutine) subroutine, profil (profil Subroutine) subroutine.
List of Memory Manipulation Services in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.