SIGPROF

SIGPROF
Description Profiling timer expired
Default action Abnormal termination of the process
SA_SIGINFO macros

None

On POSIX-compliant platforms, SIGPROF is the signal sent to a process when the profiling timer expires. The symbolic constant for SIGPROF is defined in the header file signal.h. Symbolic signal names are used because signal numbers can vary across platforms.

Etymology

SIG is a common prefix for signal names. PROF is an abbreviation for profiler.

Usage

SIGPROF is sent when a timer expires, like SIGVTALRM and the more popular SIGALRM. The distinction of SIGPROF is that its timer counts time spent executing the process and by the system carrying out tasks on behalf of the process; SIGVTALRM measures only time spent by the process itself, while SIGALRM measures real time. It is suggested that SIGPROF be used with SIGVTALRM to profile the time spent by the process in user and kernel space.