HP-UX Reference (11i v2 03/08) - 2 System Calls (vol 5)
s
sprofil(2) sprofil(2)
should always be last in the list of specified regions.
Notes
Profiling is turned off when an exec(2) is executed, but remains on in both child and parent processes
after a fork (2).
A call to profil(2) has the same effect as calling
sprofil() with just one member in the profp array
with the fields
profcnt, tvp, and
flags taking on the values of 1, NULL, and PROF_USHORT respec-
tively.
RETURN VALUE
On success,
sprofil() returns 0. Otherwise, it returns -1 and sets the global variable
errno to indi-
cate the error.
ERRORS
The
sprofil()functionfailsif:
[E2BIG]
profcnt was less than or equal to 0, or greater than
sysconf(_SC_PROFIL_MAX)
.
[EFAULT] Either
profp or tvp points to an illegal address.
[EINVAL] The
flags parameter is not valid or a pr_size field is zero or greater than (2ˆ46 *
pr_scale ) / 65536 or is not a multiple of the element size or the overflow descriptor is not
last in the list of specified regions or is more than one element long or the regions are not
sorted in ascending order by
pr_offset or the regions overlap.
SEE ALSO
profil(2), prof(1), intro(2), monitor(3C), smonitor(3C), times(2).
Section 2−−404 Hewlett-Packard Company − 3 − HP-UX 11i Version 2: August 2003