sprofil.2 (2010 09)
s
sprofil(2) sprofil(2)
Notes
Profiling is turned off when an
exec() is executed, but remains on in both child and parent processes
after a
fork().
A call to
profil() 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 respectively.
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() function fails if:
[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
prof(1), intro(2), profil(2), times(2), monitor(3C), smonitor(3C).
HP-UX 11i Version 3: September 2010 − 3 − Hewlett-Packard Company 3